[Numpy-discussion] can't resize ndarray subclass
Travis Oliphant
oliphant.travis at ieee.org
Tue Feb 28 14:15:01 CST 2006
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
More information about the Numpy-discussion
mailing list