Skip to content

Add negative and positive element-wise specs #55

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 8 commits into from
Oct 22, 2020
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
34 changes: 33 additions & 1 deletion spec/API_specification/elementwise_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,22 @@ Calculates the product for each element `x1_i` of the input array `x1` with the

- an array containing the element-wise products.

### <a name="negative" href="#negative">#</a> negative(x, /)

Computes the numerical negative of each element `x_i` (i.e., `y_i = -x_i`) of the input array `x`.

#### Parameters

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

- input array.

#### Returns

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

- an array containing the evaluated result for each element in `x`. The returned array must have a supported numerical data type.

### <a name="not_equal" href="#not_equal">#</a> not_equal(x1, x2, /)

Computes the truth value of `x1_i != x2_i` for each element `x1_i` of the input array `x1` with the respective element `x2_i` of the input array `x2`.
Expand All @@ -851,6 +867,22 @@ Computes the truth value of `x1_i != x2_i` for each element `x1_i` of the input

- an array containing the element-wise results.

### <a name="positive" href="#positive">#</a> positive(x, /)

Computes the numerical positive of each element `x_i` (i.e., `y_i = +x_i`) of the input array `x`.

#### Parameters

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

- input array.

#### Returns

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

- an array containing the evaluated result for each element in `x`. The returned array must have a supported numerical data type.

### <a name="pow" href="#pow">#</a> pow(x1, x2, /)

Calculates an implementation-dependent approximation of exponentiation by raising each element `x1_i` (the base) of the input array `x1` to the power of `x2_i` (the exponent), where `x2_i` is the corresponding element of the input array `x2`.
Expand Down Expand Up @@ -959,7 +991,7 @@ Returns an indication of the sign of a number for each element `x_i` of the inpu

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

- an array containing the evaluated result for each element in `x`. If `out` is `None`, the returned array must have the same data type as `x`.
- an array containing the evaluated result for each element in `x`.

### <a name="sin" href="#sin">#</a> sin(x, /)

Expand Down