MCPcopy Create free account
hub / github.com/numpy/numpy / _get_c_intp_name

Function _get_c_intp_name

numpy/typing/mypy_plugin.py:95–105  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93
94
95def _get_c_intp_name() -> str:
96 # Adapted from `np.core._internal._getintp_ctype`
97 char = np.dtype('p').char
98 if char == 'i':
99 return "c_int"
100 elif char == 'l':
101 return "c_long"
102 elif char == 'q':
103 return "c_longlong"
104 else:
105 return "c_long"
106
107
108#: A dictionary mapping type-aliases in `numpy._typing._nbit` to

Callers 1

mypy_plugin.pyFile · 0.85

Calls 1

dtypeMethod · 0.45

Tested by

no test coverage detected