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
+34
Original file line number
Diff line number
Diff line change
@@ -1246,5 +1246,39 @@ def to_device(
1246
1246
Clarified behavior when a provided ``device`` object corresponds to the device on which an array instance resides.
1247
1247
"""
1248
1248
1249
+
def__binsparse_descriptor__(self) ->dict:
1250
+
"""
1251
+
Returns a `dict` equivalent to a parsed `binsparse JSON descriptor <https://graphblas.org/binsparse-specification/>`_.
1252
+
1253
+
Parameters
1254
+
----------
1255
+
self: array
1256
+
array instance.
1257
+
1258
+
Returns
1259
+
-------
1260
+
out: dict
1261
+
A ``dict`` equivalent to a parsed JSON binsparse descriptor of an array. See :ref:`extensions/sparse_interchange` for details.
1262
+
1263
+
.. versionadded:: 2025.12
1264
+
"""
1265
+
1266
+
def__binsparse__(self) ->dict[str, array]:
1267
+
"""
1268
+
Returns a key-value store of the constituent arrays of a sparse array, as specified by the `binsparse specification <https://graphblas.org/binsparse-specification/>`_.
1269
+
1270
+
Parameters
1271
+
----------
1272
+
self: array
1273
+
array instance.
1274
+
1275
+
Returns
1276
+
-------
1277
+
out: dict[str, array]
1278
+
A ``dict`` equivalent to a parsed JSON binsparse descriptor of an array. See :ref:`extensions/sparse_interchange` for details.
0 commit comments