From: Todd M. <jm...@st...> - 2002-10-07 15:52:14
|
Pearu Peterson wrote: >On Mon, 7 Oct 2002, Todd Miller wrote: > >>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? >> > >Does Numarray support empty arrays? If yes, I'd vote for Python behavior: > Numarray has no problem with empty arrays so both choices are easy to implement. It apparently has a different repr (than Numeric) for "nothing" which is: array([]) Currently the tally is +2 exception, +1 Numeric-compatible. I'll probably just implement it at COB today, before I forget. Thanks for voting Todd |