[Numpy-discussion] Matlab -> NumPy translation and indexing

Timothy Hochberg tim.hochberg@ieee....
Wed Mar 14 10:08:31 CDT 2007


On 3/14/07, David Koch <ogdude@googlemail.com> wrote:
>
> On 3/14/07, Sven Schreiber <svetosch@gmx.net> wrote:
> >
> >
> >
> > If you want a 1d-array in the end you could try empty(0) to start with,
> > and then do hstack((A, your_scalar)) or something like that.
>
>

Depending on what your generating routine looks like, you might also try "a
= fromiter(...)" where you package up your scalar source as an iterator.




-- 

//=][=\\

tim.hochberg@ieee.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070314/3327a3a0/attachment.html 


More information about the Numpy-discussion mailing list