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

Mark Wiebe mwwiebe at gmail.com
Sat Jul 9 01:03:40 EDT 2011


Sorry, looks like I forgot to rebase against master as Chuck pointed out.

-Mark

On Fri, Jul 8, 2011 at 8:48 PM, Eric Firing <efiring at hawaii.edu> wrote:

> On 07/08/2011 01:31 PM, Mark Wiebe 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!
> >
> > Thanks,
> > Mark
>
> Mark,
>
> I thought I would do a test comparison of putmask and copyto, so I
> fetched and checked out your branch and tried to build it (after
> deleting my build directory), but the build failed:
>
> numpy/core/src/multiarray/multiarraymodule_onefile.c:41:20: fatal error:
> nditer.c: No such file or directory
> compilation terminated.
> error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv
> -O2 -Wall -Wstrict-prototypes -fPIC -Inumpy/core/include
> -Ibuild/src.linux-x86_64-2.7/numpy/core/include/numpy
> -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core
> -Inumpy/core/src/npymath -Inumpy/core/src/multiarray
> -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include
> -I/usr/include/python2.7
> -Ibuild/src.linux-x86_64-2.7/numpy/core/src/multiarray
> -Ibuild/src.linux-x86_64-2.7/numpy/core/src/umath -c
> numpy/core/src/multiarray/multiarraymodule_onefile.c -o
>
> build/temp.linux-x86_64-2.7/numpy/core/src/multiarray/multiarraymodule_onefile.o"
> failed with exit status 1
>
> Indeed, with rgrep I see:
> ./numpy/core/src/multiarray/multiarraymodule_onefile.c:#include "nditer.c"
>
> but no sign of nditer.c in the directory tree.
>
> Eric
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110709/97bb4336/attachment.html>


More information about the NumPy-Discussion mailing list