diff options
| author | Nathan Goldbaum <nathan.goldbaum@gmail.com> | 2023-04-14 13:20:47 -0600 |
|---|---|---|
| committer | Nathan Goldbaum <nathan.goldbaum@gmail.com> | 2023-04-18 11:03:54 -0600 |
| commit | 726676a21ac4661e81ecdb4a236324f5740500ae (patch) | |
| tree | 455923eb59cfbd307516d2271fc3164ef72fea69 /numpy/core/include | |
| parent | 8a428fdef4933edc0a74528bf51fedd3aab3f7c1 (diff) | |
| download | numpy-726676a21ac4661e81ecdb4a236324f5740500ae.tar.gz | |
ENH: Refactor special zero-filling to be managed by the DType
Diffstat (limited to 'numpy/core/include')
| -rw-r--r-- | numpy/core/include/numpy/_dtype_api.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/numpy/core/include/numpy/_dtype_api.h b/numpy/core/include/numpy/_dtype_api.h index 9a2e50890..36a8524a5 100644 --- a/numpy/core/include/numpy/_dtype_api.h +++ b/numpy/core/include/numpy/_dtype_api.h @@ -5,7 +5,7 @@ #ifndef NUMPY_CORE_INCLUDE_NUMPY___DTYPE_API_H_ #define NUMPY_CORE_INCLUDE_NUMPY___DTYPE_API_H_ -#define __EXPERIMENTAL_DTYPE_API_VERSION 9 +#define __EXPERIMENTAL_DTYPE_API_VERSION 10 struct PyArrayMethodObject_tag; @@ -199,6 +199,14 @@ typedef int (get_reduction_initial_function)( PyArrayMethod_Context *context, npy_bool reduction_is_empty, char *initial); +/** + * A function to fill an array with an initial value. + * + * @param arr The array to be filled. + * + * @returns -1 or 0 indicating error and arr being successfully filled. + */ +typedef int (fill_initial_function)(PyArrayObject *arr); /* * The following functions are only used be the wrapping array method defined @@ -319,6 +327,7 @@ typedef int (get_traverse_loop_function)( #define NPY_DT_setitem 7 #define NPY_DT_getitem 8 #define NPY_DT_get_clear_loop 9 +#define NPY_DT_fill_zero_value 10 // These PyArray_ArrFunc slots will be deprecated and replaced eventually // getitem and setitem can be defined as a performance optimization; |
