summaryrefslogtreecommitdiff
path: root/doc/source/reference
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2012-02-01 16:24:45 -0700
committerCharles Harris <charlesr.harris@gmail.com>2012-02-04 16:11:39 -0700
commit28214cf236251897038dcedfb50a62a2a2007358 (patch)
tree5a6df5beb0037a05ad4476a21341a9284e2980f6 /doc/source/reference
parent95e2e1574bf14ce463489752427274c0d138a6ec (diff)
downloadnumpy-28214cf236251897038dcedfb50a62a2a2007358.tar.gz
DOC: Replace references to macros in old_defines with new.
Also remove swig support for numpy < 1 from numpy.i since it expects the old macros.
Diffstat (limited to 'doc/source/reference')
-rw-r--r--doc/source/reference/c-api.array.rst12
-rw-r--r--doc/source/reference/c-api.types-and-structures.rst20
2 files changed, 16 insertions, 16 deletions
diff --git a/doc/source/reference/c-api.array.rst b/doc/source/reference/c-api.array.rst
index 46a215a12..89981a977 100644
--- a/doc/source/reference/c-api.array.rst
+++ b/doc/source/reference/c-api.array.rst
@@ -336,7 +336,7 @@ From scratch
and data type given by *dtype*. If *fortran* is non-zero, then a
Fortran-order array is created, otherwise a C-order array is
created. Fill the memory with zeros (or the 0 object if *dtype*
- corresponds to :ctype:`PyArray_OBJECT` ).
+ corresponds to :ctype:`NPY_OBJECT` ).
.. cfunction:: PyObject* PyArray_ZEROS(int nd, npy_intp* dims, int type_num, int fortran)
@@ -349,7 +349,7 @@ From scratch
and data type given by *dtype*. If *fortran* is non-zero, then a
Fortran-order array is created, otherwise a C-order array is
created. The array is uninitialized unless the data type
- corresponds to :ctype:`PyArray_OBJECT` in which case the array is
+ corresponds to :ctype:`NPY_OBJECT` in which case the array is
filled with :cdata:`Py_None`.
.. cfunction:: PyObject* PyArray_EMPTY(int nd, npy_intp* dims, int typenum, int fortran)
@@ -1272,7 +1272,7 @@ New data types
*totype*. Any old casting function is over-written. A ``0`` is
returned on success or a ``-1`` on failure.
-.. cfunction:: int PyArray_RegisterCanCast(PyArray_Descr* descr, int totype, PyArray_SCALARKIND scalar)
+.. cfunction:: int PyArray_RegisterCanCast(PyArray_Descr* descr, int totype, NPY_SCALARKIND scalar)
Register the data-type number, *totype*, as castable from
data-type object, *descr*, of the given *scalar* kind. Use
@@ -1281,7 +1281,7 @@ New data types
*totype*.
-Special functions for PyArray_OBJECT
+Special functions for NPY_OBJECT
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. cfunction:: int PyArray_INCREF(PyArrayObject* op)
@@ -1318,7 +1318,7 @@ Special functions for PyArray_OBJECT
Fill a newly created array with a single value obj at all
locations in the structure with object data-types. No checking is
- performed but *arr* must be of data-type :ctype:`PyArray_OBJECT` and be
+ performed but *arr* must be of data-type :ctype:`NPY_OBJECT` and be
single-segment and uninitialized (no previous objects in
position). Use :cfunc:`PyArray_DECREF` (*arr*) if you need to
decrement all the items in the object array prior to calling this
@@ -1952,7 +1952,7 @@ Calculation
Equivalent to :meth:`ndarray.mean` (*self*, *axis*, *rtype*). Returns the
mean of the elements along the given *axis*, using the enumerated
type *rtype* as the data type to sum in. Default sum behavior is
- obtained using :cdata:`PyArray_NOTYPE` for *rtype*.
+ obtained using :cdata:`NPY_NOTYPE` for *rtype*.
.. cfunction:: PyObject* PyArray_Trace(PyArrayObject* self, int offset, int axis1, int axis2, int rtype, PyArrayObject* out)
diff --git a/doc/source/reference/c-api.types-and-structures.rst b/doc/source/reference/c-api.types-and-structures.rst
index 8c813faf5..07c7e07be 100644
--- a/doc/source/reference/c-api.types-and-structures.rst
+++ b/doc/source/reference/c-api.types-and-structures.rst
@@ -388,7 +388,7 @@ PyArrayDescr_Type
.. code-block:: c
typedef struct {
- PyArray_VectorUnaryFunc *cast[PyArray_NTYPES];
+ PyArray_VectorUnaryFunc *cast[NPY_NTYPES];
PyArray_GetItemFunc *getitem;
PyArray_SetItemFunc *setitem;
PyArray_CopySwapNFunc *copyswapn;
@@ -401,8 +401,8 @@ PyArrayDescr_Type
PyArray_NonzeroFunc *nonzero;
PyArray_FillFunc *fill;
PyArray_FillWithScalarFunc *fillwithscalar;
- PyArray_SortFunc *sort[PyArray_NSORTS];
- PyArray_ArgSortFunc *argsort[PyArray_NSORTS];
+ PyArray_SortFunc *sort[NPY_NSORTS];
+ PyArray_ArgSortFunc *argsort[NPY_NSORTS];
PyObject *castdict;
PyArray_ScalarKindFunc *scalarkind;
int **cancastscalarkindto;
@@ -544,8 +544,8 @@ PyArrayDescr_Type
An array of function pointers to a particular sorting
algorithms. A particular sorting algorithm is obtained using a
- key (so far :cdata:`PyArray_QUICKSORT`, :data`PyArray_HEAPSORT`, and
- :cdata:`PyArray_MERGESORT` are defined). These sorts are done
+ key (so far :cdata:`NPY_QUICKSORT`, :data`NPY_HEAPSORT`, and
+ :cdata:`NPY_MERGESORT` are defined). These sorts are done
in-place assuming contiguous and aligned data.
.. cmember:: int argsort(void* start, npy_intp* result, npy_intp length,
@@ -563,27 +563,27 @@ PyArrayDescr_Type
functions for user- defined data-types. Each function is
wrapped in a :ctype:`PyCObject *` and keyed by the data-type number.
- .. cmember:: PyArray_SCALARKIND scalarkind(PyArrayObject* arr)
+ .. cmember:: NPY_SCALARKIND scalarkind(PyArrayObject* arr)
A function to determine how scalars of this type should be
interpreted. The argument is ``NULL`` or a 0-dimensional array
containing the data (if that is needed to determine the kind
of scalar). The return value must be of type
- :ctype:`PyArray_SCALARKIND`.
+ :ctype:`NPY_SCALARKIND`.
.. cmember:: int **cancastscalarkindto
- Either ``NULL`` or an array of :ctype:`PyArray_NSCALARKINDS`
+ Either ``NULL`` or an array of :ctype:`NPY_NSCALARKINDS`
pointers. These pointers should each be either ``NULL`` or a
pointer to an array of integers (terminated by
- :cdata:`PyArray_NOTYPE`) indicating data-types that a scalar of
+ :cdata:`NPY_NOTYPE`) indicating data-types that a scalar of
this data-type of the specified kind can be cast to safely
(this usually means without losing precision).
.. cmember:: int *cancastto
Either ``NULL`` or an array of integers (terminated by
- :cdata:`PyArray_NOTYPE` ) indicated data-types that this data-type
+ :cdata:`NPY_NOTYPE` ) indicated data-types that this data-type
can be cast to safely (this usually means without losing
precision).