numpy.longdouble and scipy status?
Iyán Méndez Veiga <[email protected]> Wed, 13 Nov 2019 14:00:23 +0100
| Newsgroups | gmane.comp.python.scientific.user |
|---|---|
| Message-ID | <2242250.9r6hlQATtY@theotp40> |
Hi, How is the current status of SciPy when using np.longdouble (np.float128)? I am doing some calculations where I would like to get a resolution of 1e-18. np.float128 in my computer would be ok for that, at least based on the output of numpy.finfo(numpy.float128). However, some scipy functions always output numpy.float64 even though the input is numpy.float128. For example, try the following code: import numpy as np from scipy.linalg import expm I = np.eye(3, dtype=np.float128) A = expm(I) print(A.dtype) >> float128 >> float64 Is this behavious expected? I couldn't find anything on scipy docs, sorry if I overlooked. Thanks, Iyán