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
+36
Original file line number
Diff line number
Diff line change
@@ -1246,5 +1246,41 @@ 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:`sparse_interchange` for details.
1262
+
1263
+
1264
+
.. versionadded:: 2025.12
1265
+
"""
1266
+
1267
+
def__binsparse__(self) ->dict[str, array]:
1268
+
"""
1269
+
Returns a key-value store of the constituent arrays of a sparse array, as specified by the `binsparse specification <https://graphblas.org/binsparse-specification/>`_.
1270
+
1271
+
Parameters
1272
+
----------
1273
+
self: array
1274
+
array instance.
1275
+
1276
+
Returns
1277
+
-------
1278
+
out: dict[str, array]
1279
+
A ``dict`` equivalent to a parsed JSON binsparse descriptor of an array. See :ref:`sparse_interchange` for details.
0 commit comments