numpy/numpy — pull request #4505 by meltingwax (2014-03-17 17:56:07+00:00)
Title: ENH: Support for file-like objects in np.fromfile

Fixes #3207. Reads file-like object into tempfile, then proceeds normally.

An object is determined to be "file-like" if it has `read` and `close` attributes. If any exceptions occur while calling these two methods, they are propagated upwards. Tests include use-case with `StringIO` and `zipfile`.