1. Thiago Avelino
  2. pypy

Commits

Timo Paulssen  committed 60161ad

simple implementation of fromfile.

  • Participants
  • Parent commits fa778e5
  • Branches numpy-data-buffer

Comments (0)

Files changed (1)

File lib_pypy/numpy/__init__.py

View file
 
     return __from_buffer_or_datastring(s, dtype, count)
 
+def fromfile(file, dtype=float, count=-1, sep=''):
+    if isinstance(file, basestring):
+        file = open(file, "r")
+    return fromstring(file.read(), dtype, count, sep)