[SciPy-user] Cookbook/InputOutput

Ryan Krauss ryanlists@gmail....
Sat Oct 27 11:49:01 CDT 2007

help split gives this:

split(ary, indices_or_sections, axis=0)
    Divide an array into a list of sub-arrays.

       Divide ary into a list of sub-arrays along the
       specified axis.  If indices_or_sections is an integer,
       ary is divided into that many equally sized arrays.
       If it is impossible to make an equal split, an error is
       raised.  This is the only way this function differs from
       the array_split() function. If indices_or_sections is a
       list of sorted integers, its entries define the indexes
       where ary is split.

On 10/26/07, Nils Wagner <nwagner@iam.uni-stuttgart.de> wrote:
> Hi all,
> I tried to use the home-made function
> (available at http://www.scipy.org/Cookbook/InputOutput)
> to read an array from the file topo-28.xohis
> (See attachment for details).
> If I run the script (xy.py) I get
> python -i xy.py
> Traceback (most recent call last):
>    File "xy.py", line 47, in ?
>      data = readArray("topo-28.xohis")
>    File "xy.py", line 35, in readArray
>      items = split(stripped_line)
> TypeError: split() takes at least 2 arguments (1 given)
> How can I fix the problem ?
> Any pointer would be appreciated.
> Thanks in advance
>                        Nils
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20071027/cb36e49e/attachment-0001.html 

More information about the SciPy-user mailing list