Re: [Numpy-discussion] can't resize ndarray subclass
by Travis Oliphant other posts by this author
Feb 28 2006 2:24PM messages near this date
Re: [Numpy-discussion] can't resize ndarray subclass
|
Re: [Numpy-discussion] can't resize ndarray subclass
Tim Hochberg wrote:
>
> I'd suggest that this get exposed as a separate function, for instance
> A._unchecked_resize(size). It seems much less likely that this will
> accidentally get called than that somone will mistakenly throw a
> second boolean argument into resize.
>
The way the resize method is written, you can't mistakenly throw in
another argument. You would have to provide a "refcheck" keyword
argument. I can't see that being a mistake.
The resize method can be called with either a sequence or with several
shapes, i.e.
a.resize((3,2))
a.resize(3,2)
Both of these are equivalent. To get the refcheck functionality you
would have to explicitly provide a keyword argument.
a.resize((3,2),refcheck=0)
a.resize(3,2,refcheck=0)
-Travis
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@[...].net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion
Thread:
Zachary Pincus
Travis Oliphant
Zachary Pincus
Travis Oliphant
Tim Hochberg
Travis Oliphant
Zachary Pincus
Travis Oliphant
Travis Oliphant
|