8000 Missingdata - Reorganize nditer implementation into a few files by mwiebe · Pull Request #104 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Missingdata - Reorganize nditer implementation into a few files #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Prev Previous commit
Next Next commit
NEP: missingdata: Add copyright info, some more NAMASK iterator clari…
…fication
  • Loading branch information
Mark Wiebe committed Jul 7, 2011
commit 50b13a781c130759fa5da8b9a4f95e3b2e63f387
23 changes: 17 additions & 6 deletions doc/neps/missing-data.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
:Title: Missing Data Functionality in NumPy
:Author: Mark Wiebe <mwwiebe@gmail.com>
:Copyright: Copyright 2011 by Enthought, Inc
:License: CC By-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0/)
:Date: 2011-06-23

*****************
Expand Down Expand Up @@ -742,6 +744,13 @@ NPY_ITER_ARRAYMASK
can be only one such mask, and there cannot also be a virtual
mask.

As a special case, if the flag NPY_ITER_USE_NAMASK is specified
at the same time, the mask for the operand is used instead
of the operand itself. If the operand has no mask but is
based on an NA dtype, that mask exposed by the iterator converts
into the NA bitpattern when copying from the buffer to the
array.

NPY_ITER_VIRTUALMASK
Indicates that the mask is not an array, but rather created on
the fly by the inner iteration code. This allocates enough buffer
Expand All @@ -752,20 +761,22 @@ NPY_ITER_VIRTUALMASK
Iterator NA-array Features
==========================

We add several new per-operand flags:

NPY_ITER_USE_NAMASK
If the operand has an NA dtype, an NA mask, or both, this adds a new
virtual operand to the end of the operand list which iterates
over the mask of the particular operand.

NPY_ITER_IGNORE_NAMASK
If an operand has an NA mask, by default the iterator will raise
an exception unless USE_NAMASK is specified. This flag disables that
check, and is intended for cases where one has first checked that
all the elements in the array are not NA using the
an exception unless NPY_ITER_USE_NAMASK is specified. This flag
disables that check, and is intended for cases where one has first
checked that all the elements in the array are not NA using the
PyArray_ContainsNA function.
If the dtype is an NA dtype, this also strips the NA-ness from
the dtype, showing a dtype that does not support NA.

If the dtype is an NA dtype, this also strips the NA-ness from the
dtype, showing a dtype that does not support NA.

********************
Rejected Alternative
Expand Down
0