[pypy-issue] Issue #1973: numpy crossproduct fails (pypy/pypy)

mike fc issues-reply at bitbucket.org
Sun Feb 8 05:18:04 CET 2015

New issue 1973: numpy crossproduct fails

mike fc:

There's an issue with the np.cross() function with pypy - it fails with an IndexError

e.g.  np.cross(np.array([1,2,3]), np.array([4,5,6]))

Using latest pypy nightly, along with pypy-numpy latest checkout.


Python 2.7.8 (07ae676d67c6, Feb 07 2015, 23:01:22)
[PyPy 2.5.0 with GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>> import numpy as np
/Users/mike/python/pypy-latest/site-packages/numpy/linalg/_umath_linalg.py:79: UserWarning: npy_clear_floatstatus, npy_set_floatstatus_invalid not found
  warn('npy_clear_floatstatus, npy_set_floatstatus_invalid not found')

>>>> np.cross(np.array([1,2,3]), np.array([4,5,6]))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/mike/python/pypy-latest/site-packages/numpy/core/numeric.py", line 1530, in cross
    shape = broadcast(a[..., 0], b[..., 0]).shape
IndexError: invalid index

More information about the pypy-issue mailing list