I always get scared by `np.isscalar` because it returns `True` for strings. @almarklein do you explicitly need it to be `float` or `int`, or could other options (e.g., `np.float32`) be okay?