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: src/array_api_stubs/_draft/array_object.py
+9-1
Original file line number
Diff line number
Diff line change
@@ -1272,7 +1272,7 @@ def __binsparse__(
1272
1272
self: array
1273
1273
array instance.
1274
1274
descriptor: Optional[dict]
1275
-
If ``descriptor`` is not ``None``, the data returned must be in the format specified by it. If the format is unsupported, a ``TypeError`` must be raised.
1275
+
If ``descriptor`` is not ``None``, the data returned must be in the format specified by it.
1276
1276
1277
1277
Returns
1278
1278
-------
@@ -1283,6 +1283,14 @@ def __binsparse__(
1283
1283
------
1284
1284
TypeError
1285
1285
If ``descriptor`` is not ``None``, and the array library does not support converting to a format specified by it.
1286
+
ValueError
1287
+
If ``descriptor`` is not a valid binsparse descriptor.
1288
+
1289
+
Notes
1290
+
-----
1291
+
1292
+
- ``x.__binsparse_descriptor__()["binsparse"]["data_types"].keys() == x.__binsparse__().keys()`` must hold.
1293
+
- ``descriptor["binsparse"]["data_types"].keys() == x.__binsparse__(descriptor=descriptor).keys()`` must hold.
0 commit comments