MCPcopy Create free account
hub / github.com/pydata/numexpr / ssize_from_dchar

Function ssize_from_dchar

numexpr3/numexpr_object.cpp:62–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62static int
63ssize_from_dchar(char c)
64{
65 switch (c) {
66 case '?': return sizeof(npy_bool);
67 case 'b': return sizeof(npy_int8);
68 case 'B': return sizeof(npy_uint8);
69 case 'h': return sizeof(npy_int16);
70 case 'H': return sizeof(npy_uint16);
71#ifdef _WIN32
72 case 'l': return sizeof(npy_int32);
73 case 'L': return sizeof(npy_uint32);
74 case 'q': return sizeof(npy_int64);
75 case 'Q': return sizeof(npy_uint64);
76#else
77 case 'i': return sizeof(npy_int32);
78 case 'I': return sizeof(npy_uint32);
79 case 'l': return sizeof(npy_int64);
80 case 'L': return sizeof(npy_uint64);
81#endif
82 case 'f': return sizeof(npy_float32);
83 case 'F': return sizeof(npy_complex64);
84 case 'd': return sizeof(npy_float64);
85 case 'D': return sizeof(npy_complex128);
86 case 'S': return 0; // strings are ok but size must be computed
87 case 'U': return 0; // strings are ok but size must be computed
88 default:
89 PyErr_Format(PyExc_TypeError,
90 "signature char '%c' not in '?bBhHiIlLdDfFSU'", c);
91 return -1;
92 }
93}
94
95static int
96NumExpr_init(NumExprObject *self, PyObject *args)

Callers 1

NumExpr_initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…