numpy
2.0.0
|
00001 #ifndef _NPY_ARRAYDESCR_H_ 00002 #define _NPY_ARRAYDESCR_H_ 00003 00004 NPY_NO_EXPORT PyObject *arraydescr_protocol_typestr_get(PyArray_Descr *); 00005 NPY_NO_EXPORT PyObject *arraydescr_protocol_descr_get(PyArray_Descr *self); 00006 00007 NPY_NO_EXPORT PyObject * 00008 array_set_typeDict(PyObject *NPY_UNUSED(ignored), PyObject *args); 00009 00010 NPY_NO_EXPORT PyArray_Descr * 00011 _arraydescr_fromobj(PyObject *obj); 00012 00013 /* 00014 * Creates a string repr of the dtype, excluding the 'dtype()' part 00015 * surrounding the object. This object may be a string, a list, or 00016 * a dict depending on the nature of the dtype. This 00017 * is the object passed as the first parameter to the dtype 00018 * constructor, and if no additional constructor parameters are 00019 * given, will reproduce the exact memory layout. 00020 * 00021 * If 'shortrepr' is non-zero, this creates a shorter repr using 00022 * 'kind' and 'itemsize', instead of the longer type name. 00023 * 00024 * If 'includealignflag' is true, this includes the 'align=True' parameter 00025 * inside the struct dtype construction dict when needed. Use this flag 00026 * if you want a proper repr string without the 'dtype()' part around it. 00027 * 00028 * If 'includealignflag' is false, this does not preserve the 00029 * 'align=True' parameter or sticky NPY_ALIGNED_STRUCT flag for 00030 * struct arrays like the regular repr does, because the 'align' 00031 * flag is not part of first dtype constructor parameter. This 00032 * mode is intended for a full 'repr', where the 'align=True' is 00033 * provided as the second parameter. 00034 */ 00035 NPY_NO_EXPORT PyObject * 00036 arraydescr_construction_repr(PyArray_Descr *dtype, int includealignflag, 00037 int shortrepr); 00038 00039 #ifdef NPY_ENABLE_SEPARATE_COMPILATION 00040 extern NPY_NO_EXPORT char *_datetime_strings[]; 00041 #endif 00042 00043 #endif