Numpy removed the np.Nan to use #np.nan.
On release Notes:
https://numpy.org/devdocs/release/2.0.0-notes.html
Alias np.NaN has been removed. Use np.nan instead.
And NEP 52:
https://numpy.org/neps/nep-0052-python-api-cleanup.html#api-changes-considered-and-rejected
Removing np.nan* functions and introducing new nan_mode argument to the related base functions.
edited in a branch