openvolley / pydatavolley

Python package for reading datavolley scouting files
13 stars 3 forks source link

AttributeError: np.NaN was removed in the NumPy 2.0 release. Use np.nan instead. #9

Open ethanellison opened 3 weeks ago

ethanellison commented 3 weeks ago

Collecting numpy>=1.23.3 (from pydatavolley)

File “/usr/local/lib/python3.12/site-packages/datavolley/read_dv.py”, line 267, in _read_data

plays['attack_phase'] = np.where((plays['skill'] == 'Attack') & (plays['skill'].shift(2) == 'Reception') & (plays['skill'].shift(1) == 'Set') & (plays['team'].shift(2) == plays['team']),'Reception', np.NaN)

Error in read_dv caused by usage of np.NaN post numpy 2.0.

Either set the package dependency to below 1.X or change every occurrence of np.NaN to np.nan in the codebase.

ethanellison commented 3 weeks ago

8 Pull request seems to address this issue!