We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01ae0fb commit 02fad70Copy full SHA for 02fad70
maths/softmax.py
@@ -48,7 +48,9 @@ def softmax(vector, axis=-1):
48
49
# Validate axis
50
if not (-vector.ndim <= axis < vector.ndim):
51
- raise np.AxisError(f"axis {axis} is out of bounds for array of dimension {vector.ndim}")
+ raise np.AxisError(
52
+ f"axis {axis} is out of bounds for array of dimension {vector.ndim}"
53
+ )
54
55
# Subtract max for numerical stability
56
vector_max = np.max(vector, axis=axis, keepdims=True)
0 commit comments