Skip to content

Commit 43edaa2

Browse files
authored
Update the default axis value for vecdot to be -1 (#281)
1 parent 436c97f commit 43edaa2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec/API_specification/linear_algebra_functions.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Returns a tensor contraction of `x1` and `x2` over specific axes.
106106
- an array containing the tensor contraction whose shape consists of the non-contracted axes (dimensions) of the first array `x1`, followed by the non-contracted axes (dimensions) of the second array `x2`. The returned array must have a data type determined by {ref}`type-promotion`.
107107

108108
(function-vecdot)=
109-
### vecdot(x1, x2, /, *, axis=None)
109+
### vecdot(x1, x2, /, *, axis=-1)
110110

111111
Computes the (vector) dot product of two arrays.
112112

@@ -120,9 +120,9 @@ Computes the (vector) dot product of two arrays.
120120

121121
- second input array. Must be compatible with `x1` (see {ref}`broadcasting`). Should have a numeric data type.
122122

123-
- **axis**: _Optional\[ int ]_
123+
- **axis**: _int_
124124

125-
- axis over which to compute the dot product. Must be an integer on the interval `[-N, N)`, where `N` is the rank (number of dimensions) of the shape determined according to {ref}`broadcasting`. If specified as a negative integer, the function must determine the axis along which to compute the dot product by counting backward from the last dimension (where `-1` refers to the last dimension). If `None`, the function must compute the dot product over the last axis. Default: `None`.
125+
- axis over which to compute the dot product. Must be an integer on the interval `[-N, N)`, where `N` is the rank (number of dimensions) of the shape determined according to {ref}`broadcasting`. If specified as a negative integer, the function must determine the axis along which to compute the dot product by counting backward from the last dimension (where `-1` refers to the last dimension). By default, the function must compute the dot product over the last axis. Default: `-1`.
126126

127127
#### Returns
128128

0 commit comments

Comments
 (0)