[SciPy-User] Simple ndarray dim question?

Erik erik.kastman@gmail....
Mon May 14 10:31:08 CDT 2012


Travis Oliphant <travis <at> continuum.io> writes:
> You could build what you saw before with: 
>
> new_onsets = empty((2,), dtype=object)
> new_onsets[0] = array([[0, 30, 60, 90]])
> new_onsets[1] = array([[15, 45, 75, 105]])
> 

That works like a charm. I guess I was trying to build an outer array
by gluing the two together, but building the structure first 
(empty(shape)) and then inserting the data arrays actually makes
more sense. Thanks for your help Travis!

Erik



More information about the SciPy-User mailing list