[Numpy-discussion] arange(-10)

Todd Miller jmiller at stsci.edu
Mon Oct 7 04:31:02 CDT 2002


The subject line contains what I consider to be an invalid range 
expression.   Numarray, now and always, reacts badly to it.  Currently, 
numarray tries to allocate a multi-gigabyte array.   In the past, it has 
dumped core.

The question is, what should it do?

1. raise ValueError, "Invalid negative range expression"     (my +1)
2. zeros((0,), 'l')                                                     
                  (Numeric does this)

Is there a good justification to keep the existing Numeric behavior? 
 Any other suggestions?

Todd





More information about the Numpy-discussion mailing list