Skip to content

Commit 6a3a411

Browse files
committed
Update the specification for full and full_like
Addresses comments in data-apisgh-85 and data-apisgh-107
1 parent d01fd1d commit 6a3a411

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/API_specification/creation_functions.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ Returns a new array containing the data from another (array) object with a `__dl
190190
```
191191
192192
(function-full)=
193-
### full(shape, fill_value, /, *, dtype=None, device=None)
193+
### full(shape, fill_value, *, dtype=None, device=None)
194194
195195
Returns a new array having a specified `shape` and filled with `fill_value`.
196196
@@ -206,7 +206,7 @@ Returns a new array having a specified `shape` and filled with `fill_value`.
206206
207207
- **dtype**: _Optional\[ <dtype> ]_
208208
209-
- output array data type. If `dtype` is `None`, the output array data type must be the default floating-point data type. Default: `None`.
209+
- 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`.
210210
211211
- **device**: _Optional\[ <device> ]_
212212
@@ -219,7 +219,7 @@ Returns a new array having a specified `shape` and filled with `fill_value`.
219219
- an array where every element is equal to `fill_value`.
220220
221221
(function-full_like)=
222-
### full_like(x, fill_value, /, *, dtype=None, device=None)
222+
### full_like(x, /, fill_value, *, dtype=None, device=None)
223223
224224
Returns a new array filled with `fill_value` and having the same `shape` as an input array `x`.
225225
@@ -235,7 +235,7 @@ Returns a new array filled with `fill_value` and having the same `shape` as an i
235235
236236
- **dtype**: _Optional\[ <dtype> ]_
237237
238-
- output array data type. If `dtype` is `None`, the output array data type must be inferred from `x`. Default: `None`.
238+
- 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`.
239239
240240
- **device**: _Optional\[ <device> ]_
241241

0 commit comments

Comments
 (0)