numpy  2.0.0
src/multiarray/scalartypes.h
Go to the documentation of this file.
00001 #ifndef _NPY_SCALARTYPES_H_
00002 #define _NPY_SCALARTYPES_H_
00003 
00004 /* Internal look-up tables */
00005 extern NPY_NO_EXPORT unsigned char
00006 _npy_can_cast_safely_table[NPY_NTYPES][NPY_NTYPES];
00007 extern NPY_NO_EXPORT signed char
00008 _npy_scalar_kinds_table[NPY_NTYPES];
00009 extern NPY_NO_EXPORT signed char
00010 _npy_type_promotion_table[NPY_NTYPES][NPY_NTYPES];
00011 extern NPY_NO_EXPORT signed char
00012 _npy_smallest_type_of_kind_table[NPY_NSCALARKINDS];
00013 extern NPY_NO_EXPORT signed char
00014 _npy_next_larger_type_table[NPY_NTYPES];
00015 
00016 NPY_NO_EXPORT void
00017 initialize_casting_tables(void);
00018 
00019 NPY_NO_EXPORT void
00020 initialize_numeric_types(void);
00021 
00022 NPY_NO_EXPORT void
00023 format_longdouble(char *buf, size_t buflen, npy_longdouble val, unsigned int prec);
00024 
00025 #if PY_VERSION_HEX >= 0x03000000
00026 NPY_NO_EXPORT void
00027 gentype_struct_free(PyObject *ptr);
00028 #else
00029 NPY_NO_EXPORT void
00030 gentype_struct_free(void *ptr, void *arg);
00031 #endif
00032 
00033 NPY_NO_EXPORT int
00034 is_anyscalar_exact(PyObject *obj);
00035 
00036 NPY_NO_EXPORT int
00037 _typenum_fromtypeobj(PyObject *type, int user);
00038 
00039 NPY_NO_EXPORT void *
00040 scalar_value(PyObject *scalar, PyArray_Descr *descr);
00041 
00042 #endif