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

Eric Firing efiring at hawaii.edu
Fri Jul 8 21:48:14 EDT 2011


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



More information about the NumPy-Discussion mailing list