[pypy-issue] Issue #1819: my objects are not aligned for some reason (pypy/pypy)

glyph issues-reply at bitbucket.org
Sun Jul 20 08:16:56 CEST 2014


New issue 1819: my objects are not aligned for some reason
https://bitbucket.org/pypy/pypy/issue/1819/my-objects-are-not-aligned-for-some-reason

glyph:

I do not even know what is an math, but I wrote some OpenGL code for fun and then I tried to run it with numpypy and it didn't work.  This seems like some pretty basic linear algebra to me, but what am I doing wrong?  Is it possible to work around this?

```
>>>> from numpy import matrix, linalg
>>>> matrix([1, 2, 3]) / linalg.norm(matrix([1, 2, 3]))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/glyph/.virtualenvs/pypy/site-packages/numpy/linalg/linalg.py", line 2056, in norm
    return sqrt(add.reduce((x.conj() * x).real, axis=None))
  File "/Users/glyph/.virtualenvs/pypy/site-packages/numpy/matrixlib/defmatrix.py", line 341, in __mul__
    return N.dot(self, asmatrix(other))
ValueError: objects are not aligned
```





More information about the pypy-issue mailing list