Commit a5511edf authored by Kirill Smelkov's avatar Kirill Smelkov

bigfile/py: We cannot use memoryview for py2 even on 2.7.10

Because numpy.ndarray does not accept it as buffer= argument

and our memcpy crashes.

NOTE if we'll need to use memoryview, we can adapt our memcpy to use
array() directly which works with memoryview, as outlined in the above
numpy issue.
parent 00db08d6
......@@ -41,10 +41,15 @@ typedef struct _frame PyFrameObject;
* on python2 < 2.7.10 memoreview object is not accepted in a lot of
* places, see e.g. for struct.pack_into()
* also on python 2.7.10, even latest numpy does not accept memoryview as
* buffer for ndarray:
* if we know memoryview won't be accepted - we pass old buffer
* TODO get rid of this and eventually use only memoryview */
// waiting for numpy to start accept it on python2
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment