diff options
| author | Sebastian Berg <sebastian@sipsolutions.net> | 2020-05-05 17:51:19 -0500 |
|---|---|---|
| committer | Sebastian Berg <sebastian@sipsolutions.net> | 2020-07-08 18:13:06 -0500 |
| commit | 5bd5847d85ce05c01e9e55a6b7075aaa4fa51f3e (patch) | |
| tree | ad24d76122bcf329ad7d1b981cf1366af06e8578 /numpy/core/include | |
| parent | b2043794f6d40ff32d45008ad2ffc69ba1fc920a (diff) | |
| download | numpy-5bd5847d85ce05c01e9e55a6b7075aaa4fa51f3e.tar.gz | |
Use new mechanism for np.asarray, and hopefully get void right, har
Diffstat (limited to 'numpy/core/include')
| -rw-r--r-- | numpy/core/include/numpy/ndarraytypes.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/numpy/core/include/numpy/ndarraytypes.h b/numpy/core/include/numpy/ndarraytypes.h index 856d233ab..912ce0a82 100644 --- a/numpy/core/include/numpy/ndarraytypes.h +++ b/numpy/core/include/numpy/ndarraytypes.h @@ -1817,8 +1817,6 @@ typedef void (PyDataMem_EventHookFunc)(void *inp, void *outp, size_t size, * The Structures defined in this block are considered private API and * may change without warning! */ - /* TODO: Make this definition public in the API, as soon as its settled */ - NPY_NO_EXPORT extern PyTypeObject PyArrayDTypeMeta_Type; typedef struct PyArray_DTypeMeta_tag PyArray_DTypeMeta; @@ -1828,6 +1826,8 @@ typedef void (PyDataMem_EventHookFunc)(void *inp, void *outp, size_t size, typedef int (is_known_scalar_function)( PyArray_DTypeMeta *cls, PyObject *obj); + typedef PyArray_Descr *(default_descr_function)(PyArray_DTypeMeta *cls); + /* * While NumPy DTypes would not need to be heap types the plan is to * make DTypes available in Python at which point they will be heap types. @@ -1881,10 +1881,19 @@ typedef void (PyDataMem_EventHookFunc)(void *inp, void *outp, size_t size, /* DType methods, these could be moved into its own struct */ discover_descr_from_pyobject_function *discover_descr_from_pyobject; is_known_scalar_function *is_known_scalar; + default_descr_function *default_descr; }; #define NPY_DTYPE(descr) ((PyArray_DTypeMeta *)Py_TYPE(descr)) + /* TODO: Make this definition public in the API, as soon as its settled */ + NPY_NO_EXPORT extern PyTypeObject PyArrayDTypeMeta_Type; + /* These are mainly needed for value based promotion in ufuncs: */ + NPY_NO_EXPORT extern PyTypeObject PyArrayAbstractObjDTypeMeta_Type; + NPY_NO_EXPORT extern PyArray_DTypeMeta PyArray_PyIntAbstractDType; + NPY_NO_EXPORT extern PyArray_DTypeMeta PyArray_PyFloatAbstractDType; + NPY_NO_EXPORT extern PyArray_DTypeMeta PyArray_PyComplexAbstractDType; + #endif /* NPY_INTERNAL_BUILD */ |
