jjhelmus / nmrglue

A module for working with NMR data in Python
BSD 3-Clause "New" or "Revised" License
208 stars 84 forks source link

Fixes for deprecations in newer versions of numpy #196

Closed kaustubhmote closed 1 year ago

kaustubhmote commented 1 year ago

This PR fixes the following:

  1. np.float is now deprecated, which breaks peak-picking (#192). This is replaced by a call to float.
  2. Use of lists as multiple slices is not allowed anymore. This broke several data conversion routines (#195). Lists are unpacked before being fed to the array as slices.

These changes are compatible with previous versions of numpy and nmrglue.

kaustubhmote commented 1 year ago
  1. The np.float to float change is removed as #193 fixes it.
  2. data[*s] is not valid syntax in Python 3.9 and lower. Changed this to data[tuple(s)]