Skip to content

Update the default axis value for vecdot to be -1 #281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions spec/API_specification/linear_algebra_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Returns a tensor contraction of `x1` and `x2` over specific axes.
- 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`.

(function-vecdot)=
### vecdot(x1, x2, /, *, axis=None)
### vecdot(x1, x2, /, *, axis=-1)

Computes the (vector) dot product of two arrays.

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

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

- **axis**: _Optional\[ int ]_
- **axis**: _int_

- 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`.
- 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`.

#### Returns

Expand Down