Integration using functions such as quad raises the warning that the function argument should be a low level callable. e.g. in line 157 of mass_profile.py:
potential = quad(self.potential_func, a=0.0, b=1.0, args=(coordinates,))[0]
self.potential function should be a LowLevelCallable.
The docs describe how a compiled c function can be used in this respect.
However, SciPy supports using python functions written in a very particular as LowLevelCallables.
Ideally all deflection functions should be modified or duplicated to be used as LowLevelCallables.
This would make calling these functions confusing. It may make sense to define any function to be used in integration as an inner function of the function that performs the integration.
Integration using functions such as quad raises the warning that the function argument should be a low level callable. e.g. in line 157 of mass_profile.py:
potential = quad(self.potential_func, a=0.0, b=1.0, args=(coordinates,))[0]self.potential function should be a LowLevelCallable.
The docs describe how a compiled c function can be used in this respect.
However, SciPy supports using python functions written in a very particular as LowLevelCallables.
Ideally all deflection functions should be modified or duplicated to be used as LowLevelCallables.
This would make calling these functions confusing. It may make sense to define any function to be used in integration as an inner function of the function that performs the integration.