[SciPy-User] getting started with ndarray
David Goldsmith
d.l.goldsmith at gmail.com
Wed May 5 22:44:45 EDT 2010
On Wed, May 5, 2010 at 7:28 PM, Victor Eijkhout <eijkhout at tacc.utexas.edu>wrote:
>
> On 2010/05/05, at 9:24 PM, Keith Goodman wrote:
>
> > Here's one way to create arrays:
>
> Thanks. Suppose I don't have the data yet, but I simple want to
> allocate a, oh let's say, 5000x300x20 array?
>
>>> import numpy as np
>>> a = np.zeros((5000, 300, 20))
>>> a.shape
(5000L, 300L, 20L)
IIRC, there's a quicker way if you don't need the array's values
initialized, but I forget what it is.
DG
>
> Victor.
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
--
Mathematician: noun, someone who disavows certainty when their uncertainty
set is non-empty, even if that set has measure zero.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20100505/774b61f4/attachment.html>
More information about the SciPy-User
mailing list