
18 Nov
2010
18 Nov
'10
7:43 p.m.
On 11/18/10 7:40 AM, Dave Hirschfeld wrote:
In [7]: data = np.loadtxt('dummy_data.txt')
or, faster:
data = np.fromfile('dummy_data.txt', dtype=np.float64, sep = ' ')
fromfile() is not very flexible, and doesn't have good error handling, but it's a lot faster than loadtxt for the simple cases like this.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov