[Numpy-svn] r2984 - in trunk/numpy/core: code_generators include/numpy src

numpy-svn at scipy.org numpy-svn at scipy.org
Thu Aug 10 08:03:59 CDT 2006


Author: oliphant
Date: 2006-08-10 08:03:55 -0500 (Thu, 10 Aug 2006)
New Revision: 2984

Modified:
   trunk/numpy/core/code_generators/multiarray_api_order.txt
   trunk/numpy/core/include/numpy/arrayobject.h
   trunk/numpy/core/src/arraymethods.c
   trunk/numpy/core/src/multiarraymodule.c
Log:
Change name of function -- no re-compile necessary.

Modified: trunk/numpy/core/code_generators/multiarray_api_order.txt
===================================================================
--- trunk/numpy/core/code_generators/multiarray_api_order.txt	2006-08-10 12:48:04 UTC (rev 2983)
+++ trunk/numpy/core/code_generators/multiarray_api_order.txt	2006-08-10 13:03:55 UTC (rev 2984)
@@ -1,6 +1,6 @@
 PyArray_Transpose
-PyArray_TakeOut
-PyArray_PutIn
+PyArray_TakeFrom
+PyArray_PutTo
 PyArray_PutMask
 PyArray_Repeat
 PyArray_Choose

Modified: trunk/numpy/core/include/numpy/arrayobject.h
===================================================================
--- trunk/numpy/core/include/numpy/arrayobject.h	2006-08-10 12:48:04 UTC (rev 2983)
+++ trunk/numpy/core/include/numpy/arrayobject.h	2006-08-10 13:03:55 UTC (rev 2984)
@@ -1533,10 +1533,10 @@
 	PyArray_CastToType(mp, PyArray_DescrFromType(type_num), 0)
 
 #define PyArray_Take(ap, items, axis) \
-        PyArray_TakeOut(ap, items, axis, NULL, NPY_RAISE)
+        PyArray_TakeFrom(ap, items, axis, NULL, NPY_RAISE)
 
 #define PyArray_Put(ap, items, values) \
-        PyArray_PutIn(ap, items, values, NPY_RAISE)
+        PyArray_PutTo(ap, items, values, NPY_RAISE)
 
 /* Compatibility with old Numeric stuff -- don't use in new code */
 

Modified: trunk/numpy/core/src/arraymethods.c
===================================================================
--- trunk/numpy/core/src/arraymethods.c	2006-08-10 12:48:04 UTC (rev 2983)
+++ trunk/numpy/core/src/arraymethods.c	2006-08-10 13:03:55 UTC (rev 2984)
@@ -24,7 +24,7 @@
                                          &mode))
 		return NULL;
 	
-	return _ARET(PyArray_TakeOut(self, indices, dimension, out, mode));
+	return _ARET(PyArray_TakeFrom(self, indices, dimension, out, mode));
 }
 
 static char doc_fill[] = "a.fill(value) places the scalar value at every "\
@@ -57,7 +57,7 @@
                                          PyArray_ClipmodeConverter,
                                          &mode))
 		return NULL;
-	return PyArray_PutIn(self, values, indices, mode);
+	return PyArray_PutTo(self, values, indices, mode);
 }
 
 static char doc_putmask[] = "a.putmask(values, mask) sets a.flat[n] = v[n] "\

Modified: trunk/numpy/core/src/multiarraymodule.c
===================================================================
--- trunk/numpy/core/src/multiarraymodule.c	2006-08-10 12:48:04 UTC (rev 2983)
+++ trunk/numpy/core/src/multiarraymodule.c	2006-08-10 13:03:55 UTC (rev 2984)
@@ -826,7 +826,8 @@
         res = PyArray_Nonzero(cond);
         Py_DECREF(cond);
         if (res == NULL) return res;
-	ret = PyArray_Take(self, PyTuple_GET_ITEM(res, 0), axis);
+	ret = PyArray_TakeFrom(self, PyTuple_GET_ITEM(res, 0), axis, 
+                               out, NPY_RAISE);
 	Py_DECREF(res);
 	return ret;
 }
@@ -3236,8 +3237,8 @@
  Take
 */
 static PyObject *
-PyArray_TakeOut(PyArrayObject *self0, PyObject *indices0, int axis, 
-                PyArrayObject *ret, NPY_CLIPMODE clipmode)
+PyArray_TakeFrom(PyArrayObject *self0, PyObject *indices0, int axis, 
+                 PyArrayObject *ret, NPY_CLIPMODE clipmode)
 {
         PyArrayObject *self, *indices;
         intp nd, i, j, n, m, max_item, tmp, chunk;
@@ -3385,7 +3386,7 @@
  Put values into an array
 */
 static PyObject *
-PyArray_PutIn(PyArrayObject *self, PyObject* values0, PyObject *indices0,
+PyArray_PutTo(PyArrayObject *self, PyObject* values0, PyObject *indices0,
               NPY_CLIPMODE clipmode)
 {
         PyArrayObject  *indices, *values;



More information about the Numpy-svn mailing list