10000 Add initial linear algebra function specifications by kgryte · Pull Request #20 · data-apis/array-api · GitHub
[go: up one dir, main page]

Skip to content

Add initial linear algebra function specifications #20

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 21 commits into from
Sep 8, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add transpose
  • Loading branch information
kgryte committed Aug 24, 2020
commit 95194aae31daa1d3f98c716cd29edc9b461f4005
19 changes: 19 additions & 0 deletions spec/API_specification/linear_algebra_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,3 +220,22 @@ Returns the sum along the specified diagonals. If `a` has more than two dimensio
out[i, j, k, ..., l] = trace(a[i, j, k, ..., l, :, :])
```

### <a name="transpose" href="#transpose">#</a> transpose(a, /, *, axes=None)

Transposes (or permutes the axes (dimensions)) of an array `a`.

#### Parameters

- **a**: _&lt;array&gt;_

- input array.

- **axes**: _Optional\[ Tuple\[ int, ... ] ]_

- tuple containing a permutation of `(0, 1, ..., N-1)` where `N` is the number of axes (dimensions) of `a`. If `None`, the axes (dimensions) are permuted in reverse order (i.e., equivalent to setting `axes=(N-1, ..., 1, 0)`). Default: `None`.

#### Returns

- **out**: _&lt;array&gt;_

- an array containing the transpose. Must have the same data type as `a`.
0