[Numpy-discussion] how to create an array of objects that are sequences?

Robert Kern robert.kern@gmail....
Fri Jan 4 14:41:16 CST 2008

Travis E. Oliphant wrote:

> I like the depth option, and that could be used with the current 
> interface without too much difficulty, I think.
> This question does come up quite often and should probably be addressed.

Alternatively, a shape= argument could be used. You can use -1 entries if you
want array() to just figure out the exact dimensions like reshape() does. The
shape= argument lets you give array() a bit more information, which might be useful.

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

More information about the Numpy-discussion mailing list