[Numpy-discussion] code review request: masked dtype transfers

Charles R Harris charlesr.harris at gmail.com
Fri Jul 8 23:24:39 EDT 2011


On Fri, Jul 8, 2011 at 5:31 PM, Mark Wiebe <mwwiebe at gmail.com> wrote:

> I've just made pull request 105:
>
> https://github.com/numpy/numpy/pull/105
>
> This adds public API PyArray_MaskedCopyInto and PyArray_MaskedMoveInto,
> which behave analogously to the corresponding unmasked functions. To expose
> this with a reasonable interface, I added a function np.copyto, which takes
> a 'where=' parameter just like the element-wise ufuncs.
>
> One thing which needs discussion is that I've flagged 'putmask' and
> PyArray_PutMask as deprecated, because 'copyto' PyArray_MaskedMoveInto
> handle what those functions do but in a more flexible fashion. If there are
> any objections to deprecating 'putmask' and PyArray_PutMask, please speak
> up!
>
>
I think it is OK to deprecate  PyArray_PutMask but it should still work. It
may be a loooong time before deprecated API functions can be removed, if
ever... As to putmask, I don't really have an opinion, but it should
probably be reimplemented to use copyto.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110708/14e0fd32/attachment.html>


More information about the NumPy-Discussion mailing list