Skip to content

Commit 02fad70

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 01ae0fb commit 02fad70

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

maths/softmax.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ def softmax(vector, axis=-1):
4848

4949
# Validate axis
5050
if not (-vector.ndim <= axis < vector.ndim):
51-
raise np.AxisError(f"axis {axis} is out of bounds for array of dimension {vector.ndim}")
51+
raise np.AxisError(
52+
f"axis {axis} is out of bounds for array of dimension {vector.ndim}"
53+
)
5254

5355
# Subtract max for numerical stability
5456
vector_max = np.max(vector, axis=axis, keepdims=True)

0 commit comments

Comments
 (0)