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:
parent
17b19d7dfd
commit
cd5e32b843
4 changed files with 16 additions and 16 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue