Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Require __pow__ and __truediv__ to have floating-point inputs #221

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

Closed
wants to merge 2 commits into from
Closed
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
16 changes: 8 additions & 8 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 @@ -1016,11 +1016,11 @@ For floating-point operands, let `self` equal `x1` and `other` equal `x2`.

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

- array instance whose elements correspond to the exponentiation base. Should have a numeric data type.
- array instance whose elements correspond to the exponentiation base. Should have a floating-point data type.

- **other**: _Union\[ int, float, <array> ]_
- **other**: _Union\[ float, <array> ]_

- other array whose elements correspond to the exponentiation exponent. Must be compatible with `self` (see {ref}`broadcasting`). Should have a numeric data type.
- other array whose elements correspond to the exponentiation exponent. Must be compatible with `self` (see {ref}`broadcasting`). Should have a floating-point data type.

#### Returns

Expand Down Expand Up @@ -1149,11 +1149,11 @@ For floating-point operands, let `self` equal `x1` and `other` equal `x2`.

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

- array instance. Should have a numeric data type.
- array instance. Should have a floating-point data type.

- **other**: _Union\[ int, float, <array> ]_
- **other**: _Union\[ float, <array> ]_

- other array. Must be compatible with `self` (see {ref}`broadcasting`). Should have a numeric data type.
- other array. Must be compatible with `self` (see {ref}`broadcasting`). Should have a floating-point data type.

#### Returns

Expand Down