You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jbeale reports that the YUV raw capture example fails at the point numpy attempts to read from the stream. I've replicated the issue in python 2 (in python 3 it just segfaults - another numpy issue or a bad build?) - although for the life of me I could swear this used to work. Numpy doesn't even seem to like loading the data from an opened file object. I can only get it working with a filename; that's doubly strange because with a filename the example never could've worked (the file would always start reading from 0) and I've definitely had this working in the past. Is this an upstream issue with some recent release of numpy? Need to investigate numpy's source...
The text was updated successfully, but these errors were encountered:
Oh dear - numpy's fromfile method is C-based and grabs the underlying FILE* pointer from the python object. Hence, it'll only work with the result of open() - not io.open() (in Python 2), or any other sort of file-like object at all. I can understand why they wanted a method that was as fast as possible, but why on earth they didn't make this a special fast-path case and have a pure Python general case I've no idea. If I can find the time I'll try and make a patch for upstream - in the meantime, I'll just have to correct the picamera example to use a temporary file (urgh).
jbeale reports that the YUV raw capture example fails at the point numpy attempts to read from the stream. I've replicated the issue in python 2 (in python 3 it just segfaults - another numpy issue or a bad build?) - although for the life of me I could swear this used to work. Numpy doesn't even seem to like loading the data from an opened file object. I can only get it working with a filename; that's doubly strange because with a filename the example never could've worked (the file would always start reading from 0) and I've definitely had this working in the past. Is this an upstream issue with some recent release of numpy? Need to investigate numpy's source...
The text was updated successfully, but these errors were encountered: