Download venv/lib/python3.10/site-packages/Cython/Utility/UFuncs_C.c from Matt300209/eval_venv: direct link, hf CLI and curl.
- Browser
- Download file 3.2 kB
-
https://huggingface.co/Matt300209/eval_venv/resolve/main/venv/lib/python3.10/site-packages/Cython/Utility/UFuncs_C.c
- Command line
-
hf download hf://Matt300209/eval_venv/venv/lib/python3.10/site-packages/Cython/Utility/UFuncs_C.c
-
curl -L -o UFuncs_C.c https://huggingface.co/Matt300209/eval_venv/resolve/main/venv/lib/python3.10/site-packages/Cython/Utility/UFuncs_C.c
3.2 kB
| ///////////////////////// UFuncsInit.proto ///////////////////////// | |
| //@proto_block: utility_code_proto_before_types | |
| // account for change in type of arguments to PyUFuncGenericFunction in Numpy 1.19.x | |
| // Unfortunately we can only test against Numpy version 1.20.x since it wasn't marked | |
| // as an API break. Therefore, I'm "solving" the issue by casting function pointer types | |
| // on lower Numpy versions. | |
| /////////////////////// UFuncTypeHandling.proto ////////////// | |
| /////////////////////// UFuncTypedef.proto /////////////////// | |
| //@requires: UFuncTypeHandling | |
| enum { | |
| /* | |
| Deduce what to tell Numpy about the extern typedef '{{type_cname}}' | |
| */ | |
| __Pyx_typedef_ufunc_{{type_substituted_cname}} = {{macro_name}}({{type_cname}}), | |
| /* Validation: | |
| If the line below is failing then you are using the extern typedef | |
| '{{type_cname}}' as a parameter in a ufunc and Cython can't work out | |
| how to map the type to a Numpy type. | |
| */ | |
| __Pyx_typedef_ufunc_validation_{{type_substituted_cname}} = | |
| 1 / (int)(__Pyx_typedef_ufunc_{{type_substituted_cname}} - NPY_NOTYPE) | |
| }; | |
| /////////////////////// UFuncConsts.proto //////////////////// | |
| // getter functions because we can't forward-declare arrays | |
| static PyUFuncGenericFunction* {{ufunc_funcs_name}}(void); /* proto */ | |
| static char* {{ufunc_types_name}}(void); /* proto */ | |
| static void* {{ufunc_data_name}}[] = {NULL}; /* always null */ | |
| /////////////////////// UFuncConsts ///////////////////////// | |
| static PyUFuncGenericFunction* {{ufunc_funcs_name}}(void) { | |
| static PyUFuncGenericFunction arr[] = { | |
| {{for loop, cname in looper(func_cnames)}} | |
| __PYX_PYUFUNCGENERICFUNCTION_CAST(&{{cname}}){{if not loop.last}},{{endif}} | |
| {{endfor}} | |
| }; | |
| return arr; | |
| } | |
| static char* {{ufunc_types_name}}(void) { | |
| static char arr[] = { | |
| {{for loop, tp in looper(type_constants)}} | |
| {{tp}}{{if not loop.last}},{{endif}} | |
| {{endfor}} | |
| }; | |
| return arr; | |
| } | |