diff options
author | Tom Krauss <thomas.p.krauss+github@gmail.com> | 2015-05-25 13:05:05 -0500 |
---|---|---|
committer | Tom Krauss <thomas.p.krauss+github@gmail.com> | 2015-05-25 13:05:05 -0500 |
commit | a49ad1523c87766134aa98e04772d988040516fb (patch) | |
tree | a0fee9db4d2e1f885f33ab9d5128fe583f6bcd48 /doc | |
parent | 08443023ddaf774d7b956323860be9b3ae2fa19a (diff) | |
download | numpy-a49ad1523c87766134aa98e04772d988040516fb.tar.gz |
New typemap for in-place arrays of arbitrary number of dimensions:
(DATA_TYPE* INPLACE_ARRAY_FLAT, DIM_TYPE DIM_FLAT)
Added unittests, updated documentation.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/source/reference/swig.interface-file.rst | 11 | ||||
-rw-r--r-- | doc/source/reference/swig.testing.rst | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/doc/source/reference/swig.interface-file.rst b/doc/source/reference/swig.interface-file.rst index c381feb85..e5d369d0e 100644 --- a/doc/source/reference/swig.interface-file.rst +++ b/doc/source/reference/swig.interface-file.rst @@ -320,6 +320,17 @@ signatures are These typemaps now check to make sure that the ``INPLACE_ARRAY`` arguments use native byte ordering. If not, an exception is raised. +There is also a "flat" in-place array for situations in which +you would like to modify or process each element, regardless of the +number of dimensions. One example is a "quantization" function that +quantizes each element of an array in-place, be it 1D, 2D or whatever. +This form checks for continuity but allows either C or Fortran ordering. + +ND: + + * ``(DATA_TYPE* INPLACE_ARRAY_FLAT, DIM_TYPE DIM_FLAT)`` + + Argout Arrays ````````````` diff --git a/doc/source/reference/swig.testing.rst b/doc/source/reference/swig.testing.rst index c0daaec66..13642a52e 100644 --- a/doc/source/reference/swig.testing.rst +++ b/doc/source/reference/swig.testing.rst @@ -57,6 +57,7 @@ Two-dimensional arrays are tested in exactly the same manner. The above description applies, but with ``Matrix`` substituted for ``Vector``. For three-dimensional tests, substitute ``Tensor`` for ``Vector``. For four-dimensional tests, substitute ``SuperTensor`` +for ``Vector``. For flat in-place array tests, substitute ``Flat`` for ``Vector``. For the descriptions that follow, we will reference the ``Vector`` tests, but the same information applies to ``Matrix``, |