On Tue, May 6, 2008 at 10:03 AM, Timothy Hochberg <[EMAIL PROTECTED]> wrote:
> Why don't you just roll your own?
>
> >>> def nans(shape, dtype=float):
> ... a = np.empty(shape, dtype)
> ... a.fill(np.nan)
> ... return a
> ...
> >>> nans([3,4])
> array([[ NaN, NaN, NaN, NaN],
>
On Tue, May 6, 2008 at 9:53 AM, Keith Goodman <[EMAIL PROTECTED]> wrote:
> On Tue, May 6, 2008 at 9:45 AM, Anne Archibald
> <[EMAIL PROTECTED]> wrote:
> > In fact, if you want to use empty() down the road, it may
> > make sense to initialize your array to zeros()/0., so that if you ever
> > use
On Tue, May 6, 2008 at 9:45 AM, Anne Archibald
<[EMAIL PROTECTED]> wrote:
> In fact, if you want to use empty() down the road, it may
> make sense to initialize your array to zeros()/0., so that if you ever
> use the values, the NaNs will propagate and become obvious.
Numpy has ones and zeros.
2008/5/6 Andy Cheesman <[EMAIL PROTECTED]>:
> I was wondering if anyone could shed some light on how to distinguish an
> empty array of a given shape and an zeros array of the same dimensions.
An "empty" array, that is, an array returned by the function empty(),
just means an uninitialized arra
On Tue, May 6, 2008 at 9:31 AM, Andy Cheesman <[EMAIL PROTECTED]>
wrote:
> Hi nice numpy people
>
> I was wondering if anyone could shed some light on how to distinguish an
> empty array of a given shape and an zeros array of the same dimensions.
An empty array is just uninitialized, while a zer
Hi nice numpy people
I was wondering if anyone could shed some light on how to distinguish an
empty array of a given shape and an zeros array of the same dimensions.
Thanks
Andy
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://proje