In the nunmpy library, there are a large number of C extension functions whose types are _ArrayFunctionDispatcher or ufunc. In order to extract the symbol information of these functions, we have to introduce hard coding when judging the symbol type:
var pyFuncTypes = map[string]bool{
"ufunc": true,
"method": true,
"function": true,
"method-wrapper": true,
"builtin_function_or_method": true,
"_ArrayFunctionDispatcher": true
}
How can I reduce this hardcoding in my code?
In the
nunmpylibrary, there are a large number of C extension functions whose types are_ArrayFunctionDispatcherorufunc. In order to extract the symbol information of these functions, we have to introduce hard coding when judging the symbol type:How can I reduce this hardcoding in my code?