开发者

How can I intentionally create a non-aligned numpy array?

I need to intentionally create a non-aligned numpy array. In particular, I want PyArray_ISALIGNED(array) to return false. What causes numpy arrays not to be aligned, and how can I easily, manually trigger tho开发者_C百科se conditions?


I don't know the details, there is a test in scipy.linalg that checks that misaligned arrays don't cause an error with Lapack.

http://projects.scipy.org/scipy/browser/trunk/scipy/linalg/tests/test_decomp.py?rev=#L1065

However, if you search scipy tickets, you see that there are some problems across various platforms.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜