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.
精彩评论