Skip to content

Commit 4172d85

Browse files
committed
Update docs
1 parent 04e2268 commit 4172d85

File tree

4 files changed

+21
-17
lines changed

4 files changed

+21
-17
lines changed

array_api_compat/cupy/_info.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class __array_namespace_info__:
5050
5151
Examples
5252
--------
53-
>>> info = np.__array_namespace_info__()
53+
>>> info = xp.__array_namespace_info__()
5454
>>> info.default_dtypes()
5555
{'real floating': cupy.float64,
5656
'complex floating': cupy.complex128,
@@ -95,7 +95,8 @@ def capabilities(self):
9595
>>> info = xp.__array_namespace_info__()
9696
>>> info.capabilities()
9797
{'boolean indexing': True,
98-
'data-dependent shapes': True}
98+
'data-dependent shapes': True,
99+
'max dimensions': 64}
99100
100101
"""
101102
return {

array_api_compat/dask/array/_info.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class __array_namespace_info__:
5050
5151
Examples
5252
--------
53-
>>> info = np.__array_namespace_info__()
53+
>>> info = xp.__array_namespace_info__()
5454
>>> info.default_dtypes()
5555
{'real floating': dask.float64,
5656
'complex floating': dask.complex128,
@@ -103,10 +103,11 @@ def capabilities(self):
103103
104104
Examples
105105
--------
106-
>>> info = np.__array_namespace_info__()
106+
>>> info = xp.__array_namespace_info__()
107107
>>> info.capabilities()
108108
{'boolean indexing': True,
109-
'data-dependent shapes': True}
109+
'data-dependent shapes': True,
110+
'max dimensions': 64}
110111
111112
"""
112113
return {
@@ -135,7 +136,7 @@ def default_device(self):
135136
136137
Examples
137138
--------
138-
>>> info = np.__array_namespace_info__()
139+
>>> info = xp.__array_namespace_info__()
139140
>>> info.default_device()
140141
'cpu'
141142
@@ -173,7 +174,7 @@ def default_dtypes(self, *, device=None):
173174
174175
Examples
175176
--------
176-
>>> info = np.__array_namespace_info__()
177+
>>> info = xp.__array_namespace_info__()
177178
>>> info.default_dtypes()
178179
{'real floating': dask.float64,
179180
'complex floating': dask.complex128,
@@ -239,7 +240,7 @@ def dtypes(self, *, device=None, kind=None):
239240
240241
Examples
241242
--------
242-
>>> info = np.__array_namespace_info__()
243+
>>> info = xp.__array_namespace_info__()
243244
>>> info.dtypes(kind='signed integer')
244245
{'int8': dask.int8,
245246
'int16': dask.int16,
@@ -347,7 +348,7 @@ def devices(self):
347348
348349
Examples
349350
--------
350-
>>> info = np.__array_namespace_info__()
351+
>>> info = xp.__array_namespace_info__()
351352
>>> info.devices()
352353
['cpu', DASK_DEVICE]
353354

array_api_compat/numpy/_info.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ def capabilities(self):
9494
>>> info = np.__array_namespace_info__()
9595
>>> info.capabilities()
9696
{'boolean indexing': True,
97-
'data-dependent shapes': True}
97+
'data-dependent shapes': True,
98+
'max dimensions': 64}
9899
99100
"""
100101
return {

array_api_compat/torch/_info.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class __array_namespace_info__:
3434
3535
Examples
3636
--------
37-
>>> info = np.__array_namespace_info__()
37+
>>> info = xp.__array_namespace_info__()
3838
>>> info.default_dtypes()
3939
{'real floating': numpy.float64,
4040
'complex floating': numpy.complex128,
@@ -76,10 +76,11 @@ def capabilities(self):
7676
7777
Examples
7878
--------
79-
>>> info = np.__array_namespace_info__()
79+
>>> info = xp.__array_namespace_info__()
8080
>>> info.capabilities()
8181
{'boolean indexing': True,
82-
'data-dependent shapes': True}
82+
'data-dependent shapes': True,
83+
'max dimensions': 64}
8384
8485
"""
8586
return {
@@ -106,7 +107,7 @@ def default_device(self):
106107
107108
Examples
108109
--------
109-
>>> info = np.__array_namespace_info__()
110+
>>> info = xp.__array_namespace_info__()
110111
>>> info.default_device()
111112
device(type='cpu')
112113
@@ -147,7 +148,7 @@ def default_dtypes(self, *, device=None):
147148
148149
Examples
149150
--------
150-
>>> info = np.__array_namespace_info__()
151+
>>> info = xp.__array_namespace_info__()
151152
>>> info.default_dtypes()
152153
{'real floating': torch.float32,
153154
'complex floating': torch.complex64,
@@ -296,7 +297,7 @@ def dtypes(self, *, device=None, kind=None):
296297
297298
Examples
298299
--------
299-
>>> info = np.__array_namespace_info__()
300+
>>> info = xp.__array_namespace_info__()
300301
>>> info.dtypes(kind='signed integer')
301302
{'int8': numpy.int8,
302303
'int16': numpy.int16,
@@ -331,7 +332,7 @@ def devices(self):
331332
332333
Examples
333334
--------
334-
>>> info = np.__array_namespace_info__()
335+
>>> info = xp.__array_namespace_info__()
335336
>>> info.devices()
336337
[device(type='cpu'), device(type='mps', index=0), device(type='meta')]
337338

0 commit comments

Comments
 (0)