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

Function intern_strings

numpy/core/src/multiarray/multiarraymodule.c:4957–5017  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4955NPY_VISIBILITY_HIDDEN PyObject * npy_ma_str_where = NULL;
4956
4957static int
4958intern_strings(void)
4959{
4960 npy_ma_str_current_allocator = PyUnicode_InternFromString("current_allocator");
4961 if (npy_ma_str_current_allocator == NULL) {
4962 return -1;
4963 }
4964 npy_ma_str_array = PyUnicode_InternFromString("__array__");
4965 if (npy_ma_str_array == NULL) {
4966 return -1;
4967 }
4968 npy_ma_str_array_function = PyUnicode_InternFromString("__array_function__");
4969 if (npy_ma_str_array_function == NULL) {
4970 return -1;
4971 }
4972 npy_ma_str_array_struct = PyUnicode_InternFromString("__array_struct__");
4973 if (npy_ma_str_array_struct == NULL) {
4974 return -1;
4975 }
4976 npy_ma_str_array_priority = PyUnicode_InternFromString("__array_priority__");
4977 if (npy_ma_str_array_priority == NULL) {
4978 return -1;
4979 }
4980 npy_ma_str_array_interface = PyUnicode_InternFromString("__array_interface__");
4981 if (npy_ma_str_array_interface == NULL) {
4982 return -1;
4983 }
4984 npy_ma_str_array_wrap = PyUnicode_InternFromString("__array_wrap__");
4985 if (npy_ma_str_array_wrap == NULL) {
4986 return -1;
4987 }
4988 npy_ma_str_array_finalize = PyUnicode_InternFromString("__array_finalize__");
4989 if (npy_ma_str_array_finalize == NULL) {
4990 return -1;
4991 }
4992 npy_ma_str_implementation = PyUnicode_InternFromString("_implementation");
4993 if (npy_ma_str_implementation == NULL) {
4994 return -1;
4995 }
4996 npy_ma_str_axis1 = PyUnicode_InternFromString("axis1");
4997 if (npy_ma_str_axis1 == NULL) {
4998 return -1;
4999 }
5000 npy_ma_str_axis2 = PyUnicode_InternFromString("axis2");
5001 if (npy_ma_str_axis2 == NULL) {
5002 return -1;
5003 }
5004 npy_ma_str_like = PyUnicode_InternFromString("like");
5005 if (npy_ma_str_like == NULL) {
5006 return -1;
5007 }
5008 npy_ma_str_numpy = PyUnicode_InternFromString("numpy");
5009 if (npy_ma_str_numpy == NULL) {
5010 return -1;
5011 }
5012 npy_ma_str_where = PyUnicode_InternFromString("where");
5013 if (npy_ma_str_where == NULL) {
5014 return -1;

Callers 1

PyInit__multiarray_umathFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected