diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2011-07-06 16:28:34 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2011-07-06 16:28:34 -0600 |
commit | ddbe1d5301ad2c08ef97158d84d9856a9ac8b3cb (patch) | |
tree | 02f41154add143cf369d4369ed13302dbb234738 /doc/source/reference/internals.code-explanations.rst | |
parent | a84257505bfc5436affb3d62da0aac2038d6172e (diff) | |
parent | 4703dd0d33b0455033ec9b5de526995d72b959cf (diff) | |
download | numpy-ddbe1d5301ad2c08ef97158d84d9856a9ac8b3cb.tar.gz |
Merge branch 'pull-99'
* pull-99: (24 commits)
TST: ufunc: Disable where= buffering test temporarily
DOC: c-api: Update to reflect array flag namespace change
NEP: missing-data: Add Peter to the Acknowledgments
NEP: missing-data: Add "Python API" and "C API" definitions
NEP: missing-data: Add numpy.ma to the glossary
NEP: missing-data: Add glossary of terms, try to clarify them better
NEP: missing-data: Fix copy/paste/edit typo for np.all example
NEP: missing-data: Incorporate Ben's feedback, add section on 'shared masks'
TST: umath: Add tests for casting output parameters
ENH: core: Deprecate some bad namespace-polluting macros
NEP: missingdata: Rename 'hasmask' and friends to 'hasnamask' and friends
NEP: missing-data: Add name to acknowledgments
NEP: missingdata: Various improvements
TST: ma: Feedback from Derek about Python 3 failures in ma tests
NEP: Trying to make the NEP's position on missing values and masks vs bit patterns more clear
DOC: Document the ufunc 'where=' parameter and the NpyAuxData C API mechanism
ENH: umath: Add tests, work out kinks in ufunc 'where=' parameter
ENH: umath: Write the function to call the masked inner loop
ENH: umath: Add parsing of a 'where=' parameter in the element-wise ufunc
ENH: umath: Implement the default type resolution for masked loops
...
Diffstat (limited to 'doc/source/reference/internals.code-explanations.rst')
-rw-r--r-- | doc/source/reference/internals.code-explanations.rst | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/doc/source/reference/internals.code-explanations.rst b/doc/source/reference/internals.code-explanations.rst index cceb1a60d..580661cb3 100644 --- a/doc/source/reference/internals.code-explanations.rst +++ b/doc/source/reference/internals.code-explanations.rst @@ -41,20 +41,20 @@ called a rank-0 array), then the strides and dimensions variables are NULL. Besides the structural information contained in the strides and -dimensions members of the :ctype:`PyArrayObject`, the flags contain important -information about how the data may be accessed. In particular, the -:cdata:`NPY_ALIGNED` flag is set when the memory is on a suitable boundary -according to the data-type array. Even if you have a contiguous chunk -of memory, you cannot just assume it is safe to dereference a data- -type-specific pointer to an element. Only if the :cdata:`NPY_ALIGNED` flag is -set is this a safe operation (on some platforms it will work but on -others, like Solaris, it will cause a bus error). The :cdata:`NPY_WRITEABLE` -should also be ensured if you plan on writing to the memory area of -the array. It is also possible to obtain a pointer to an unwriteable -memory area. Sometimes, writing to the memory area when the -:cdata:`NPY_WRITEABLE` flag is not set will just be rude. Other times it can -cause program crashes ( *e.g.* a data-area that is a read-only -memory-mapped file). +dimensions members of the :ctype:`PyArrayObject`, the flags contain +important information about how the data may be accessed. In particular, +the :cdata:`NPY_ARRAY_ALIGNED` flag is set when the memory is on a +suitable boundary according to the data-type array. Even if you have +a contiguous chunk of memory, you cannot just assume it is safe to +dereference a data- type-specific pointer to an element. Only if the +:cdata:`NPY_ARRAY_ALIGNED` flag is set is this a safe operation (on +some platforms it will work but on others, like Solaris, it will cause +a bus error). The :cdata:`NPY_ARRAY_WRITEABLE` should also be ensured +if you plan on writing to the memory area of the array. It is also +possible to obtain a pointer to an unwriteable memory area. Sometimes, +writing to the memory area when the :cdata:`NPY_ARRAY_WRITEABLE` flag is not +set will just be rude. Other times it can cause program crashes ( *e.g.* +a data-area that is a read-only memory-mapped file). Data-type encapsulation |