[SciPy-user] feature request: Reading in arrays.

Jochen Küpper jochen at jochen-kuepper.de
Thu Nov 1 20:47:53 CST 2001


Besides everything else...

On Thu, 25 Oct 2001 12:03:25 -0400 (EDT) Travis Oliphant wrote:

Travis> As eric pointed out reading arrays of ASCII data is actually
Travis> quite easy (and fairly sophisticated).

Would it be possible to allow empty lines in the file (and simply skip
them)?

For
,----[test.dat]
| # Hallo
| 
| 1       2
| 3       4
| 5       6
`----
I get

Python 2.1.1 (#1, Aug 28 2001, 19:51:39)
[GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-85)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> from scipy.io import *
Plotting methods available:  ['xplt', 'gplt']
>>> x = read_array('test.dat')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.1/site-packages/scipy/io/array_import.py", line 272, in read_array
    a.resize((row,colsize))
ValueError: Newsize is zero.  Cannot delete an array in this way.
>>>

Greetings,
Jochen
-- 
Einigkeit und Recht und Freiheit                http://www.Jochen-Kuepper.de
    Liberté, Égalité, Fraternité                GnuPG key: 44BCCD8E
        Sex, drugs and rock-n-roll




More information about the SciPy-user mailing list