- changed status to resolved
np.newaxis results in different strides than numpy
Issue #34
resolved
Pypy:
>>>> import numpy as np
>>>> a = np.random.randn(20)
>>>> a[:, np.newaxis].strides
(8, 8)
Plain numpy:
>>> import numpy as np
>>> a = np.random.randn(20)
>>> a[:, np.newaxis].strides
(8, 0)
These are technically equivalent, so PyPy's result is not technically wrong. It's just different from Numpy's. If you're not going for identical behavior in corner cases, feel free to close this.
Comments (1)
-
- Log in to comment
Thanks. Fixed in pypy/pypy /1f1d7e1c14c21f9e64d0bfecc9a54959e77f4326, hopefully without causing other problems