Removed deprecated np.float

numpy 1.20 deprecates np.float, which was only ever an alias for
``float``.  I've replaced all occurrences of np.float with float, as
recommended.  There should be no change in functionality.
This commit is contained in:
Richard Bowman 2021-03-30 17:40:19 +01:00
parent 17b19d7dfd
commit cd5e32b843
4 changed files with 16 additions and 16 deletions

View file

@ -21,8 +21,8 @@ class JSONEncoder(LabThingsJSONEncoder):
# Numpy integers
elif isinstance(o, np.integer):
return int(o)
# Numpy floats
elif isinstance(o, np.float):
# Numpy floats are just Python floats
elif isinstance(o, float):
return float(o)
# Numpy arrays
elif isinstance(o, np.ndarray):