Skip to content

Add dtype keyword argument to sum and prod #238

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 13 commits into from
Sep 17, 2021
Prev Previous commit
Clarify casting rules
  • Loading branch information
kgryte authored Sep 17, 2021
commit feb5fe477d798b20ed0c2a4918289b8cd2ed96c4
4 changes: 2 additions & 2 deletions spec/API_specification/statistical_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Calculates the product of input array `x` elements.

- data type of the returned array. If `None`,

- if the default data type corresponding to the data type "kind" (integer or floating-point) of `x` is smaller than the data type of `x` (e.g., `x` has data type `int64` and the default data type is `int32`), the returned array must have the same data type as `x`.
- if the default data type corresponding to the data type "kind" (integer or floating-point) of `x` has a smaller range of values than the data type of `x` (e.g., `x` has data type `int64` and the default data type is `int32`, or `x` has data type `uint64` and the default data type is `int64`), the returned array must have the same data type as `x`.
- otherwise, the returned array must have the default data type corresponding to the data type "kind" (integer or floating-point) of `x`.

If the data type (either specified or resolved) differs from the data type of `x`, the input array should be cast to the specified data type before computing the product. Default: `None`.
Expand Down Expand Up @@ -176,7 +176,7 @@ Calculates the sum of the input array `x`.

- data type of the returned array. If `None`,

- if the default data type corresponding to the data type "kind" (integer or floating-point) of `x` is smaller than the data type of `x` (e.g., `x` has data type `int64` and the default data type is `int32`), the returned array must have the same data type as `x`.
- if the default data type corresponding to the data type "kind" (integer or floating-point) of `x` has a smaller range of values than the data type of `x` (e.g., `x` has data type `int64` and the default data type is `int32`, or `x` has data type `uint64` and the default data type is `int64`), the returned array must have the same data type as `x`.
- otherwise, the returned array must have the default data type corresponding to the data type "kind" (integer or floating-point) of `x`.

If the data type (either specified or resolved) differs from the data type of `x`, the input array should be cast to the specified data type before computing the sum. Default: `None`.
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy