automatic casting does not work in linalg
Issue #38
open
this does not fail in cpython::
>>>> np.linalg.det(np.identity(3, int))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "D:\pypy_stuff\pypy-2.6.0-win32\site-packages\numpy\linalg\linalg.py", line 1734, in det
return _umath_linalg.det(a, signature=signature).astype(result_t)
TypeError: input dtype [=i4,None,] did not match any known dtypes [=f4,=f4,=f8,=f8,=c8,=f4,=c16,=f8]
>>>>
GenericUnaryFunctions should cast from a int
to float
dtype
Comments (3)
-
reporter -
reporter - changed status to open
return value is still incorrect
-
In pypy 4.0.0 the code returns
array(1.0)
This is still wrong but only because it returns an array instead of a scalar.
- Log in to comment
Also, the return value should be a scalar, not an array