On 3/31/07, P GM <[EMAIL PROTECTED]> wrote:
> Actually, there's even faster than that:
>
> a = 3
> a = array(a, ndmin=1)
>
>
> atleast_1d is nothing but a wrapper function, that works best when used with
> several inputs. When using only one array as inputs, the trick above should
> be more appropriate.

I think you'll want to add the copy=False arg if you go that route, or
else you'll end up with something that's much slower than atleast_1d
for any array that gets passed in.  :-)

  a = array(a, copy=0,ndmin=1)

Anyway, sounds like premature optimization to me.

--bb
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to