summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2012-02-01 18:42:25 -0700
committerCharles Harris <charlesr.harris@gmail.com>2012-02-04 16:11:39 -0700
commit8a0e7cd26ea2803b8580dcca1d1306baa1d702dc (patch)
tree47af5fff3afe569556ea1824358296f87efdc327 /numpy/core
parentc4b92ea0a2530c1dfe582d7f5635a0b793286166 (diff)
downloadnumpy-8a0e7cd26ea2803b8580dcca1d1306baa1d702dc.tar.gz
UPDATE: Replace macros in old_defines.h by new.
With the exception of the numarray fixups these were all instances that were results of code generation.
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/code_generators/generate_umath.py2
-rw-r--r--numpy/core/src/multiarray/arraytypes.c.src22
-rw-r--r--numpy/core/src/multiarray/scalartypes.c.src4
-rw-r--r--numpy/core/src/scalarmathmodule.c.src4
4 files changed, 16 insertions, 16 deletions
diff --git a/numpy/core/code_generators/generate_umath.py b/numpy/core/code_generators/generate_umath.py
index 052947e37..7e8ed1d2b 100644
--- a/numpy/core/code_generators/generate_umath.py
+++ b/numpy/core/code_generators/generate_umath.py
@@ -884,7 +884,7 @@ def make_arrays(funcdict):
funclist.append('%s_%s' % (tname, name))
for x in t.in_ + t.out:
- siglist.append('PyArray_%s' % (english_upper(chartoname[x]),))
+ siglist.append('NPY_%s' % (english_upper(chartoname[x]),))
k += 1
diff --git a/numpy/core/src/multiarray/arraytypes.c.src b/numpy/core/src/multiarray/arraytypes.c.src
index 8f72f919e..1d81be8a8 100644
--- a/numpy/core/src/multiarray/arraytypes.c.src
+++ b/numpy/core/src/multiarray/arraytypes.c.src
@@ -3550,11 +3550,11 @@ static PyArray_ArrFuncs _Py@NAME@_ArrFuncs = {
static PyArray_Descr @from@_Descr = {
PyObject_HEAD_INIT(&PyArrayDescr_Type)
&Py@NAME@ArrType_Type,
- PyArray_@from@LTR,
- PyArray_@from@LTR,
+ NPY_@from@LTR,
+ NPY_@from@LTR,
'@endian@',
0,
- PyArray_@from@,
+ NPY_@from@,
0,
_ALIGN(@align@),
NULL,
@@ -3659,11 +3659,11 @@ static PyArray_ArrFuncs _Py@NAME@_ArrFuncs = {
NPY_NO_EXPORT PyArray_Descr @from@_Descr = {
PyObject_HEAD_INIT(&PyArrayDescr_Type)
&Py@NAME@ArrType_Type,
- PyArray_@kind@LTR,
- PyArray_@from@LTR,
+ NPY_@kind@LTR,
+ NPY_@from@LTR,
'@endian@',
@isobject@,
- PyArray_@from@,
+ NPY_@from@,
@num@*sizeof(@fromtyp@),
_ALIGN(@fromtyp@),
NULL,
@@ -3900,8 +3900,8 @@ set_typeinfo(PyObject *dict)
#else
s = Py_BuildValue("ciii@cx@@cn@O",
#endif
- PyArray_@name@LTR,
- PyArray_@name@,
+ NPY_@name@LTR,
+ NPY_@name@,
BITSOF_@uname@,
_ALIGN(@type@),
@max@,
@@ -3922,11 +3922,11 @@ set_typeinfo(PyObject *dict)
*/
PyDict_SetItemString(infodict, "@name@",
#if defined(NPY_PY3K)
- s = Py_BuildValue("CiiiO", PyArray_@name@LTR,
+ s = Py_BuildValue("CiiiO", NPY_@name@LTR,
#else
- s = Py_BuildValue("ciiiO", PyArray_@name@LTR,
+ s = Py_BuildValue("ciiiO", NPY_@name@LTR,
#endif
- PyArray_@name@,
+ NPY_@name@,
BITSOF_@name@,
_ALIGN(@type@),
(PyObject *) &Py@Name@ArrType_Type));
diff --git a/numpy/core/src/multiarray/scalartypes.c.src b/numpy/core/src/multiarray/scalartypes.c.src
index 71fc8ad95..dc9facfc4 100644
--- a/numpy/core/src/multiarray/scalartypes.c.src
+++ b/numpy/core/src/multiarray/scalartypes.c.src
@@ -2549,7 +2549,7 @@ finish:
return NULL;
}
/* typecode will be NULL */
- typecode = PyArray_DescrFromType(PyArray_@TYPE@);
+ typecode = PyArray_DescrFromType(NPY_@TYPE@);
dest = scalar_value(obj, typecode);
src = scalar_value(robj, typecode);
Py_DECREF(typecode);
@@ -3719,7 +3719,7 @@ initialize_casting_tables(void)
* #SCKIND = BOOL, (INTNEG, INTPOS)*5, FLOAT*4,
* COMPLEX*3#
*/
- _npy_scalar_kinds_table[NPY_@NAME@] = PyArray_@SCKIND@_SCALAR;
+ _npy_scalar_kinds_table[NPY_@NAME@] = NPY_@SCKIND@_SCALAR;
_npy_next_larger_type_table[NPY_@NAME@] = @BIGGERTYPE@;
/**end repeat**/
diff --git a/numpy/core/src/scalarmathmodule.c.src b/numpy/core/src/scalarmathmodule.c.src
index 113d39fa0..24f5ebfe8 100644
--- a/numpy/core/src/scalarmathmodule.c.src
+++ b/numpy/core/src/scalarmathmodule.c.src
@@ -600,8 +600,8 @@ _@name@_convert_to_ctype(PyObject *a, npy_@name@ *arg1)
return -1;
}
descr1 = PyArray_DescrFromTypeObject((PyObject *)Py_TYPE(a));
- if (PyArray_CanCastSafely(descr1->type_num, PyArray_@NAME@)) {
- PyArray_CastScalarDirect(a, descr1, arg1, PyArray_@NAME@);
+ if (PyArray_CanCastSafely(descr1->type_num, NPY_@NAME@)) {
+ PyArray_CastScalarDirect(a, descr1, arg1, NPY_@NAME@);
Py_DECREF(descr1);
return 0;
}