EMD does not work with numpy >= 2.0

When calling the emd.spectra.frequency_transform function with numpy >= 2.0.0, the following exception is thrown:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[17], line 1
----> 1 IP, IF, IA = emd.spectra.frequency_transform(imf, sample_rate, 'hilbert')

File ~/path/venv/lib/python3.11/site-packages/emd/spectra.py:191, in frequency_transform(imf, sample_rate, method, smooth_freq, smooth_phase)
    188 ifreq = freq_from_phase(iphase, sample_rate, savgol_width=smooth_freq)
    190 # Return wrapped phase
--> 191 iphase = imftools.wrap_phase(iphase)
    193 logger.info('COMPLETED: compute frequency stats. Returning {0} imfs'.format(iphase.shape[1]))
    194 return iphase, ifreq, iamp

File ~/path/venv/lib/python3.11/site-packages/emd/imftools.py:146, in wrap_phase(IP, ncycles, mode)
    123 def wrap_phase(IP, ncycles=1, mode='2pi'):
    124     """Wrap a phase time-course.
    125 
    126     Parameters
   (...)
    144 
    145     """
--> 146     if (ncycles < 1) or (np.can_cast(ncycles, int) is False):
    147         raise ValueError("'ncycles' must be a positive integer value - input was '{0}'".format(ncycles))
    149     if mode not in ['2pi', '-pi2pi']:

TypeError: can_cast() does not support Python ints, floats, and complex because the result used to depend on the value.
This change was part of adopting NEP 50, we may explicitly allow them again in the future.

It appears that in numpy 2.0.0, the following was changed with can_cast (see here):

Changed in version 2.0: This function does not support Python scalars anymore and does not apply any value-based logic for 0-D arrays and NumPy scalars.