great-tables
great-tables copied to clipboard
epic: Remove numpy as a dependency
Currently, we use numpy in two places:
-
No dependency:
_tbl_data.py
: this is where we've consolidated all our DataFrame library specific code. It's handled using databackend, so we don't need to depend on these libraries to do isinstance checks on them, etc... -
Dependency:
_utils_nanoplots.py
,_data_color/base.py
. This uses numpy in two ways.-
Detecting np.integer. This could be moved to
_tbl_data.py
-
Performing calculations. Functions like
np.linspace()
, andnp.mean()
should be re-implemented internally. We don't use too many numpy functions, so it hopefully isn't too nuts to do.
-
Detecting np.integer. This could be moved to
Note that for replacing numpy in performing calculations, we should be careful to ensure tests are in place / added where needed. We have good coverage, but I'm not sure it covers every numpy path.