8000 Some improvements to type hints by asmeurer · Pull Request #230 · data-apis/array-api · GitHub
[go: up one dir, main page]

Skip to content

Some improvements to type hints #230

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 7 commits into from
Aug 19, 2021
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
Fix a typo in the __setitem__ annotations
  • Loading branch information
asmeurer committed Aug 12, 2021
commit f58e381b988e26d239e4e6f7a980c00e51a6efe6
6 changes: 3 additions & 3 deletions spec/API_specification/array_object.md
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ The `matmul` function must implement the same semantics as the built-in `@` oper

- **self**: _<array>_

- array instance. Should have a numeric data type. Must have at least one dimension. If `self` is one-dimensional having shape `(M)` and `other` has more than one dimension, `self` must be promoted to a two-dimensional array by prepending `1` to its dimensions (i.e., must have shape `(1, M)`). After matrix multiplication, the prepended dimensions in the returned array must be removed. If `self` has more than one dimension (including after vector-to-matrix promotion), `self` must be compatible with `other` (see {ref}`broadcasting`). If `self` has shape `(..., M, K)`, the innermost two dimensions form matrices on which to perform matrix multiplication.
- array instance. Should have a numeric data type. Must have at least one dimension. If `self` is one-dimensional having shape `(M)` and `other` has more than one dimension, `self` must be promoted to a two-dimensional array by prepending `1` to its dimensions (i.e., must have shape `(1, M)`). After matrix multiplication, the prepended dimensions in the returned array must be removed. If `self` has more than one dimension (including after vector-to-matrix promotion), `self` must be compatible with `other` (see {ref}`broadcasting`). If `self` has shape `(..., M, K)`, the innermost two dimensions form matrices on which to perform matrix multiplication.

- **other**: _<array>_

Expand Down Expand Up @@ -809,7 +809,7 @@ The `matmul` function must implement the same semantics as the built-in `@` oper

- if either `self` or `other` is a zero-dimensional array.
- if `self` is a one-dimensional array having shape `(N)`, `other` is a one-dimensional array having shape `(M)`, and `N != M`.
- if `self` is an array having shape `(..., M, K)`, `other` is an array having shape `(..., L, N)`, and `K != L`.
- if `self` is an array having shape `(..., M, K)`, `other` is an array having shape `(..., L, N)`, and `K != L`.

(method-__mod__)=
### \_\_mod\_\_(self, other, /)
Expand Down Expand Up @@ -1066,7 +1066,7 @@ Sets `self[key]` to `value`.

#### Parameters

- **self**: _<array;>_
- **self**: _<array>_

- array instance.

Expand Down
0