diff options
author | Mark Wiebe <mwwiebe@gmail.com> | 2011-03-10 01:02:15 -0800 |
---|---|---|
committer | Mark Wiebe <mwwiebe@gmail.com> | 2011-03-10 18:39:02 -0800 |
commit | f567479c716a6f9398820e92cde9f4ea129b889a (patch) | |
tree | 2094e60d866178d665c499862276059296a984e2 | |
parent | 0c0c49ce89f447b423c52aee795b1bf1fec4e9fe (diff) | |
download | numpy-f567479c716a6f9398820e92cde9f4ea129b889a.tar.gz |
API: Remove PyArray_FillWithZero from public API
This function is too specific. A function like
PyArray_FillWithValue(PyArrayObject *ao, double value)
would be better.
-rw-r--r-- | numpy/core/code_generators/numpy_api.py | 10 | ||||
-rw-r--r-- | numpy/core/src/multiarray/convert.c | 2 | ||||
-rw-r--r-- | numpy/core/src/multiarray/convert.h | 3 | ||||
-rw-r--r-- | numpy/core/src/multiarray/einsum.c.src | 2 |
4 files changed, 10 insertions, 7 deletions
diff --git a/numpy/core/code_generators/numpy_api.py b/numpy/core/code_generators/numpy_api.py index 6a1d16904..cd897e3ce 100644 --- a/numpy/core/code_generators/numpy_api.py +++ b/numpy/core/code_generators/numpy_api.py @@ -310,12 +310,10 @@ multiarray_funcs_api = { 'PyArray_CanCastArrayTo': 273, 'PyArray_CanCastTypeTo': 274, 'PyArray_EinsteinSum': 275, - 'PyArray_FillWithZero': 276, - 'PyArray_NewLikeArray': 277, - 'PyArray_GetArrayParamsFromObject': 278, - 'PyArray_ConvertClipmodeSequence': 279, - # - 'PyArray_MatrixProduct2': 280, + 'PyArray_NewLikeArray': 276, + 'PyArray_GetArrayParamsFromObject': 277, + 'PyArray_ConvertClipmodeSequence': 278, + 'PyArray_MatrixProduct2': 279, } ufunc_types_api = { diff --git a/numpy/core/src/multiarray/convert.c b/numpy/core/src/multiarray/convert.c index 2c61744a7..b40519a4e 100644 --- a/numpy/core/src/multiarray/convert.c +++ b/numpy/core/src/multiarray/convert.c @@ -353,7 +353,7 @@ PyArray_FillWithScalar(PyArrayObject *arr, PyObject *obj) return 0; } -/*NUMPY_API +/* * Fills an array with zeros. * * Returns 0 on success, -1 on failure. diff --git a/numpy/core/src/multiarray/convert.h b/numpy/core/src/multiarray/convert.h index de24e27cf..1a34cfc52 100644 --- a/numpy/core/src/multiarray/convert.h +++ b/numpy/core/src/multiarray/convert.h @@ -1,4 +1,7 @@ #ifndef _NPY_ARRAYOBJECT_CONVERT_H_ #define _NPY_ARRAYOBJECT_CONVERT_H_ +NPY_NO_EXPORT int +PyArray_FillWithZero(PyArrayObject *a); + #endif diff --git a/numpy/core/src/multiarray/einsum.c.src b/numpy/core/src/multiarray/einsum.c.src index ddd38864f..ab939f734 100644 --- a/numpy/core/src/multiarray/einsum.c.src +++ b/numpy/core/src/multiarray/einsum.c.src @@ -19,6 +19,8 @@ #include <ctype.h> +#include "convert.h" + #ifdef __SSE__ #define EINSUM_USE_SSE1 1 #else |