Skip to content
Merged
14 changes: 7 additions & 7 deletions spec/API_specification/creation_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Returns evenly spaced values within the half-open interval `[start, stop)` as a

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

- output array data type. Default: `None`.
- output array data type. If `dtype` is `None`, the output array data type must be the default floating-point data type. Default: `None`.

#### Returns

Expand All @@ -53,7 +53,7 @@ Returns an uninitialized array having a specified `shape`.

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

- output array data type. Default: `None`.
- output array data type. If `dtype` is `None`, the output array data type must be the default floating-point data type. Default: `None`.

#### Returns

Expand Down Expand Up @@ -101,7 +101,7 @@ Returns a two-dimensional array with ones on the `k`th diagonal and zeros elsewh

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

- output array data type. Default: `None`.
- output array data type. If `dtype` is `None`, the output array data type must be the default floating-point data type. Default: `None`.

#### Returns

Expand All @@ -125,7 +125,7 @@ Returns a new array having a specified `shape` and filled with `fill_value`.

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

- output array data type. Default: `None`.
- output array data type. If `dtype` is `None`, the output array data type must be the default floating-point data type. Default: `None`.

#### Returns

Expand Down Expand Up @@ -179,7 +179,7 @@ Returns evenly spaced numbers over a specified interval.

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

- output array data type. Default: `None`.
- output array data type. If `dtype` is `None`, the output array data type must be the default floating-point data type. Default: `None`.

- **endpoint**: _Optional\[ bool ]_

Expand All @@ -203,7 +203,7 @@ Returns a new array having a specified `shape` and filled with ones.

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

- output array data type. Default: `None`.
- output array data type. If `dtype` is `None`, the output array data type must be the default floating-point data type. Default: `None`.

#### Returns

Expand Down Expand Up @@ -243,7 +243,7 @@ Returns a new array having a specified `shape` and filled with zeros.

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

- output array data type. Default: `None`.
- output array data type. If `dtype` is `None`, the output array data type must be the default floating-point data type. Default: `None`.

#### Returns

Expand Down
18 changes: 15 additions & 3 deletions spec/API_specification/data_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,28 @@

A conforming implementation of the array API standard must provide and support the following data types.

.. note::

Data types ("dtypes") are objects that can be used as `dtype` specifiers in functions and methods (e.g., `zeros((2, 3), dtype=float32)`). A conforming implementation may add methods or attributes to data type objects; however, these methods and attributes are not included in this specification.

.. note::

Implementations may provide other ways to specify data types (e.g.,
`zeros((2, 3), dtype='f4')`); however, these are not included in this specification.

A conforming implementation of the array API standard may provide and support additional data types beyond those described in this specification.

A conforming implementation of the array API standard must define a default floating-point data type (either `float32` or `float64`).

.. note::

These dtypes are objects that can be used as dtype specifiers in functions and methods (e.g., `zeros((2, 3), dtype=float32)`). A conforming implementation may add methods or attributes to dtype objects; these are not part of this specification however.
The default floating-point data type should be clearly defined in a conforming library's documentation.

A conforming implementation of the array API standard must define a default data type for an array index (either `int32` or `int64`).

.. note::

Implementations may provide others ways to specify dtypes (e.g.,
`zeros((2, 3), dtype='f4')`); these are not part of this specification however.
The default array index data type should be clearly defined in a conforming library's documentation.


## bool
Expand Down
Loading