Use numpy.loadtxt instead of newer numpy.genfromtxt in Hemingway driver.
authorW. Trevor King <wking@drexel.edu>
Fri, 18 Jun 2010 01:02:05 +0000 (21:02 -0400)
committerW. Trevor King <wking@drexel.edu>
Fri, 18 Jun 2010 01:02:05 +0000 (21:02 -0400)
From
  http://docs.scipy.org/doc/numpy/user/basics.io.genfromtxt.html
"In particular, genfromtxt is able to take missing data into account,
when other faster and simpler functions like loadtxt cannot"

We prefer loadtxt because:
  * It's faster and we don't need to handle missing data.
  * It's older (genfromtxt added in Numpy in 2009/01/19, released in
    v1.3.0), so it's more likely to be in the user's stock Numpy
    installation.

hooke/driver/hemingway.py

index 7fecbb01c9ad7f714592b124db45e421fe63c5c1..8cd5f5e0547e55640b877f3a2471ff4c4cdac1f8 100644 (file)
@@ -53,7 +53,7 @@ class HemingwayDriver (Driver):
                 fields = line.split(':', 1)
                 if len(fields) == 2:
                     file_info[fields[0]] = fields[1]
-            data = numpy.genfromtxt(f, dtype=numpy.float)
+            data = numpy.loadtxt(f, dtype=numpy.float)
         ret = curve.Data(
             shape=data.shape,
             dtype=data.dtype,