[Numpy-discussion] Simplifying array()

Todd Miller jmiller at stsci.edu
Wed Jan 12 16:36:17 CST 2005


Someone (way to go Rory!) recently posted a patch (woohoo!) for
numarray which I think bears a little discussion since it involves
the re-write of a fundamental numarray function: array().
The patch fixes a number of bugs and deconvolutes the logic of array().

The patch is here if you want to look at it yourself:

http://sourceforge.net/tracker/?atid=450449&group_id=1369&func=browse

One item I thought needed some discussion was the removal of two
features:

>   * array() does too much. E.g., handling file/memory instances for
>     'sequence'. There's fromfile for the former, and users needing
>     the latter functionality should be clued up enough to
>     instantiate NumArray directly.

I agree with this myself.  Does anyone care if they will no longer be
able to construct an array from a file or buffer object using array()
rather than fromfile() or NumArray(), respectively?  Is a deprecation
process necessary to remove them? 

I think strings.py and records.py also have "over-stuffed" array()
functions...  so consistency bids us to streamline those as well.  

Regards,
Todd





More information about the Numpy-discussion mailing list