[Numpy-discussion] column_stack with mixed data types

Ryan Krauss ryanlists at gmail.com
Mon Jul 30 19:02:38 EDT 2007


I just tend to think in terms of lists rather than tuples.  Why is a
tuple a more reasonable choice than a list?  (I'm really asking and
not being argumentative, since you can't hear my tone.)

Ryan

On 7/30/07, Robert Kern <robert.kern at gmail.com> wrote:
> Ryan Krauss wrote:
> > In writing a function to parse my data, I ran into some unexpected
> > behavior.  Is it intentional that a recarray can only be created by a
> > list of tuples and not by a list of lists?
>
> Yeah. The array() constructor needs some information for it to work its magic.
> Requiring tuples for the actual records is an arbitrary choice, but a reasonable
> one given that.
>
> --
> 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
> Numpy-discussion at scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>



More information about the NumPy-Discussion mailing list