[NumPy-Tickets] [NumPy] #1911: recarray fromfile doesn't support file like objects
NumPy Trac
numpy-tickets@scipy....
Mon Jul 18 11:42:02 CDT 2011
#1911: recarray fromfile doesn't support file like objects
-------------------------+--------------------------------------------------
Reporter: sbreuss | Owner: somebody
Type: enhancement | Status: new
Priority: normal | Milestone: Unscheduled
Component: numpy.core | Version: devel
Keywords: recarray |
-------------------------+--------------------------------------------------
The current implementation of the record array fromfile method doesn't
support file like objects (e.g. StringIO, io.BytesIO, ...)
By two minor changes in the source this would be possible:[[BR]]
1) change the get_remaining_size method to use seek[[BR]]
2) not using the readinto method of the file object[[BR]]
I'm open to any suggestions, a patch for the current master version
showing my changes is attached.
Cheers,[[BR]]
Simon Breuss
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1911>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list