You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec/API_specification/data_types.md
+27-13
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,6 @@
6
6
7
7
A conforming implementation of the array API standard must provide and support the following data types.
8
8
9
-
A conforming implementation of the array API standard must define a default floating-point data type (either `float32` or `float64`), as well as a default integer data type (`int32` or `int64`). These default data types must be the same across platforms. The default integer data type may vary depending on whether Python is 32-bit or 64-bit.
10
-
11
-
```{note}
12
-
The default floating-point and array index integer data types should be clearly defined in a conforming library's documentation.
13
-
```
14
-
15
-
16
9
## bool
17
10
18
11
Boolean (`True` or `False`).
@@ -60,8 +53,9 @@ IEEE 754 double-precision (64-bit) binary floating-point number (see IEEE 754-20
60
53
61
54
:::{admonition} Future extension
62
55
:class: hint
63
-
It is expected that in the next version of this standard, `complex64` and `complex128`
64
-
dtypes will be added, with these casting rules (will be added to {ref}`type-promotion`):
56
+
`complex64` and `complex128` dtypes are expected to be included in the next
57
+
version of this standard and to have the following casting rules (will be added
58
+
to {ref}`type-promotion`):
65
59
66
60

67
61
@@ -78,13 +72,33 @@ Implementations may provide other ways to specify data types (e.g.,
78
72
A conforming implementation of the array API standard may provide and support additional data types beyond those described in this specification.
79
73
```
80
74
75
+
(data-type-defaults)=
76
+
## Default Data Types
77
+
78
+
A conforming implementation of the array API standard must define a default floating-point data type (either `float32` or `float64`) and a default integer data type (`int32` or `int64`).
79
+
80
+
The default data types must be the same across platforms.
81
+
82
+
The default integer data type may vary depending on whether Python is 32-bit or 64-bit.
83
+
84
+
```{note}
85
+
The default floating-point and integer data types should be clearly defined in a conforming library's documentation.
86
+
```
87
+
81
88
(data-type-categories)=
82
89
## Data Type Categories
83
90
84
-
For the purposes of this specification, the following data type categories are defined.
85
-
Libraries do not need to organize dtypes according to these categories. These
86
-
are only for organizing the functions in this specification itself. Future versions of
87
-
the specification will include additional categories for complex data types.
91
+
For the purpose of organizing functions within this specification, the following data type categories are defined.
92
+
93
+
```{note}
94
+
Conforming libraries are not required to organize dtypes according to these categories. These
95
+
categories are only intended for use within this specification.
96
+
```
97
+
98
+
```{note}
99
+
Future versions of the specification will include additional categories for
0 commit comments