On Thu, Dec 18, 2008 at 07:58, David Cournapeau
<[email protected]> wrote:

> What would be the need for a 0 item array ? If the point is to append
> some data without knowing in advance the size, a list is most likely
> more adapted to the task. An array which cannot be indexed does not
> sound that useful, but I may just lack some imagination :)

It's an edge case (literally) that can pop up when you are doing
slicing on larger arrays. 0-item arrays do fit in numpy's memory
model, so specifically disallowing them would mean gratuitously
requiring try: excepts: in code that would otherwise be generic.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to