From f567479c716a6f9398820e92cde9f4ea129b889a Mon Sep 17 00:00:00 2001 From: Mark Wiebe Date: Thu, 10 Mar 2011 01:02:15 -0800 Subject: API: Remove PyArray_FillWithZero from public API This function is too specific. A function like PyArray_FillWithValue(PyArrayObject *ao, double value) would be better. --- numpy/core/code_generators/numpy_api.py | 10 ++++------ numpy/core/src/multiarray/convert.c | 2 +- numpy/core/src/multiarray/convert.h | 3 +++ numpy/core/src/multiarray/einsum.c.src | 2 ++ 4 files changed, 10 insertions(+), 7 deletions(-) (limited to 'numpy') 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 +#include "convert.h" + #ifdef __SSE__ #define EINSUM_USE_SSE1 1 #else -- cgit v1.2.1