summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2009-07-21 05:32:41 +0000
committerDavid Cournapeau <cournape@gmail.com>2009-07-21 05:32:41 +0000
commit23cee8fff08ab1d33aed18bdcec35324497ae85d (patch)
tree566f6482c150e87337aabce35a2b5a440b8e1fa7
parent8311cc98cec959ffb5ecf5c43d3a73587eb27289 (diff)
downloadnumpy-23cee8fff08ab1d33aed18bdcec35324497ae85d.tar.gz
Rename zero member to constant.
-rw-r--r--numpy/core/include/numpy/_neighborhood_iterator_imp.h2
-rw-r--r--numpy/core/include/numpy/ndarrayobject.h6
-rw-r--r--numpy/core/src/multiarray/iterators.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/numpy/core/include/numpy/_neighborhood_iterator_imp.h b/numpy/core/include/numpy/_neighborhood_iterator_imp.h
index b110f1c15..7a9a22f27 100644
--- a/numpy/core/include/numpy/_neighborhood_iterator_imp.h
+++ b/numpy/core/include/numpy/_neighborhood_iterator_imp.h
@@ -79,7 +79,7 @@ static NPY_INLINE int _PyArrayNeighborhoodIter_IncrCoord2D(PyArrayNeighborhoodIt
#define _INF_SET_PTR(c) \
bd = iter->coordinates[c] + iter->_internal_iter->coordinates[c]; \
if (bd < 0 || bd > iter->dimensions[c]) { \
- iter->dataptr = iter->zero; \
+ iter->dataptr = iter->constant; \
return 1; \
} \
offset = iter->coordinates[c] * iter->strides[c]; \
diff --git a/numpy/core/include/numpy/ndarrayobject.h b/numpy/core/include/numpy/ndarrayobject.h
index 479ac2771..43da7c8c3 100644
--- a/numpy/core/include/numpy/ndarrayobject.h
+++ b/numpy/core/include/numpy/ndarrayobject.h
@@ -939,9 +939,9 @@ typedef struct {
/* Neighborhood points coordinates are computed relatively to the point pointed
* by _internal_iter */
PyArrayIterObject* _internal_iter;
- /* To keep a reference to the zero representation correponding to the dtype
- * of the array we iterate over */
- char* zero;
+ /* To keep a reference to the representation of the constant value for
+ * constant padding */
+ char* constant;
} PyArrayNeighborhoodIterObject;
/*
diff --git a/numpy/core/src/multiarray/iterators.c b/numpy/core/src/multiarray/iterators.c
index e447fe07c..bba319e09 100644
--- a/numpy/core/src/multiarray/iterators.c
+++ b/numpy/core/src/multiarray/iterators.c
@@ -1768,7 +1768,7 @@ PyArray_NeighborhoodIterNew(PyArrayIterObject *x, intp *bounds)
for (i = 0; i < ret->nd; ++i) {
ret->dimensions[i] = x->ao->dimensions[i];
}
- ret->zero = PyArray_Zero(x->ao);
+ ret->constant = PyArray_Zero(x->ao);
/*
* XXX: we force x iterator to be non contiguous because we need
@@ -1783,7 +1783,7 @@ PyArray_NeighborhoodIterNew(PyArrayIterObject *x, intp *bounds)
static void neighiter_dealloc(PyArrayNeighborhoodIterObject* iter)
{
- PyDataMem_FREE(iter->zero);
+ PyDataMem_FREE(iter->constant);
Py_DECREF(iter->_internal_iter);
array_iter_base_dealloc((PyArrayIterObject*)iter);