On Mon, Jun 21, 2010 at 13:44, Benjamin Root <[email protected]> wrote:
> Hello,
>
> I ran into a somewhat counter-intuitive situation that probably should be
> documented somewhere with respect to record (structured?) arrays.  I wanted
> to stack multiple arrays together that had the same names for the columns.
> Since I was imagining the columns as having the names (as opposed to rows),
> I figured vstack() would do the job, but it merely created a sequence of
> record arrays.  Turns out that I had to use hstack() to get what I wanted.

Remember that your structured arrays are simply 1-D vectors of
records. 1-D vectors are primarily treated as row vectors by things
that care about "horizontal" and "vertical" for all dtypes, both
records and "normal" scalars. It just gets a bit confusing because one
often thinks of 1-D arrays of records as being rows and columns.

-- 
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://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to