convert_props({"a": np.float32(1.)}) gives the error TypeError: Object of type float32 is not JSON serializable
This is an issue if you take eg max_value=array.max() for some numpy array, as this returns a np.float32 object not float. This can likely be fixed with a quick hack to cast types like this to a float. I may add this myself at some point.
convert_props({"a": np.float32(1.)})
gives the errorTypeError: Object of type float32 is not JSON serializable
This is an issue if you take eg
max_value=array.max()
for some numpy array, as this returns anp.float32
object notfloat
. This can likely be fixed with a quick hack to cast types like this to a float. I may add this myself at some point.