-
-
Notifications
You must be signed in to change notification settings - Fork 12.1k
Closed
Labels
Description
After #13134 is merged, np.exp and np.log return float32 arrays for float16 inputs. Is the change intended? I could not find docs for it (https://www.numpy.org/devdocs/reference/generated/numpy.exp.html), while it is documented that np.sum casts ints to the default platform integer.
Reproducing code example:
import numpy as np
print(np.exp(np.array([1, 2], np.float16)).dtype) # => float32
print(np.log(np.array([1, 2], np.float16)).dtype) # => float32Numpy/Python version information:
1.17.0.dev0+64b3e67 3.7.1 (default, Nov 6 2018, 21:02:07)
[Clang 10.0.0 (clang-1000.10.44.4)]
Reactions are currently unavailable