You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ignoring the numerical analysis I would have guessed that this might work for the newer expm, but I guess not. TypeError: unsupported operand type(s) for *: 'numpy.float128' and 'long'
I'm not sure what that error means. Can we not multiply numpy float128 and python integers together?
>>> np.__version__
'1.7.1'
>>> np.array(42, dtype='float128') * long(42)
1764.0
>>> np.array(42, dtype='float128') * 1000111000111000111000111
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for *: 'numpy.float128' and 'long'
I think the float128 is still exotic and not completely supported by numpy in the same way that the smaller data types are supported. For example see this 2011 mailing list post. I'm not sure how many if any of those problems have been fixed in the numpy development version.
This originally came up at this ask.sagemath question.
And indeed the code only allows float64, float32, complex64, or complex128.
This is an enhancement request, since presumably the numerical analysis needed to correctly deal with this is nontrivial!
The text was updated successfully, but these errors were encountered: