Is there any clean way of setting numpy to use float32 values instead of float64 globally?
For each function you can overload by:
def array(*args, **kwargs): kwargs.setdefault("dtype", np.float32) return np.array(*args, **kwargs)
As posted by njsmith on github