np.cross() not working since ndarray.broadcast not imlemented

Create issue
Issue #18 resolved
mike fc created an issue

There appears to be an issue with the np.cross() function - 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

Comments (6)

  1. Log in to comment