great-tables icon indicating copy to clipboard operation
great-tables copied to clipboard

numpy: replace convenience functions in `_utils_nanoplots.py`

Open machow opened this issue 5 months ago • 4 comments

in great_tables._utils_nanoplots we have a few cases of numpy being used to generate sequences, etc.. (e.g. np.linspace). Let's replace these with pure python versions.

I don't think speed is too critical, as I suspect there's quite a bit of room for optimization in nanoplots, and the size of data for Great Tables is usually not bananas.

  • np.random.uniform()
  • np.linspace()
  • np.integer in isinstance check. Create NpInteger class in _tbl_data.py using databackend (similar to PlSeries, etc..). This will enable it to perform the check w/o importing numpy.

machow avatar Jun 04 '25 16:06 machow