Skip to content

Clarify full and full_like behavior when fill value exceeds precision #261

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 1 commit into from
Sep 15, 2021
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
10 changes: 9 additions & 1 deletion spec/API_specification/creation_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,11 @@ Returns a new array having a specified `shape` and filled with `fill_value`.

- **dtype**: _Optional\[ <dtype> ]_

- output array data type. If `dtype` is `None`, the output array data type must be inferred from `fill_value`. If it's an `int`, the output array dtype must be the default integer dtype; if it's a `float`, then the output array dtype must be the default floating-point data type; if it's a `bool` then the output array must have boolean dtype. Default: `None`.
- output array data type. If `dtype` is `None`, the output array data type must be inferred from `fill_value`. If the fill value is an `int`, the output array data type must be the default integer data type. If the fill value is a `float`, the output array data type must be the default floating-point data type. If the fill value is a `bool`, the output array must have boolean data type. Default: `None`.

```{note}
If `dtype` is `None` and the `fill_value` exceeds the precision of the resolved default output array data type, behavior is left unspecified and, thus, implementation-defined.
```

- **device**: _Optional\[ <device> ]_

Expand Down Expand Up @@ -237,6 +241,10 @@ Returns a new array filled with `fill_value` and having the same `shape` as an i

- output array data type. If `dtype` is `None`, the output array data type must be inferred from `fill_value` (see {ref}`function-full`). Default: `None`.

```{note}
If `dtype` is `None` and the `fill_value` exceeds the precision of the resolved default output array data type, behavior is left unspecified and, thus, implementation-defined.
```

- **device**: _Optional\[ <device> ]_

- device to place the created array on, if given. If `device` is `None`, the default device must be used, not `x.device`. Default: `None`.
Expand Down