python-graphblas 2023.5.0__tar.gz → 2023.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/LICENSE +1 -1
  2. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/MANIFEST.in +1 -3
  3. {python-graphblas-2023.5.0/python_graphblas.egg-info → python-graphblas-2023.7.0}/PKG-INFO +25 -8
  4. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/README.md +23 -6
  5. python-graphblas-2023.7.0/conftest.py +42 -0
  6. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/agg/__init__.py +4 -4
  7. python-graphblas-2023.7.0/graphblas/binary/ss.py +6 -0
  8. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/agg.py +2 -2
  9. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/automethods.py +1 -1
  10. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/base.py +3 -3
  11. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/descriptor.py +1 -0
  12. {python-graphblas-2023.5.0/graphblas → python-graphblas-2023.7.0/graphblas/core}/dtypes.py +99 -109
  13. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/expr.py +1 -1
  14. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/mask.py +5 -5
  15. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/matrix.py +18 -18
  16. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/operator/base.py +1 -1
  17. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/operator/binary.py +3 -3
  18. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/operator/indexunary.py +4 -3
  19. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/operator/semiring.py +2 -2
  20. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/operator/unary.py +3 -3
  21. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/recorder.py +1 -1
  22. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/scalar.py +1 -1
  23. python-graphblas-2023.7.0/graphblas/core/ss/__init__.py +3 -0
  24. python-graphblas-2023.7.0/graphblas/core/ss/binary.py +72 -0
  25. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/ss/config.py +46 -11
  26. python-graphblas-2023.7.0/graphblas/core/ss/context.py +146 -0
  27. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/ss/descriptor.py +21 -9
  28. python-graphblas-2023.7.0/graphblas/core/ss/dtypes.py +88 -0
  29. python-graphblas-2023.7.0/graphblas/core/ss/indexunary.py +77 -0
  30. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/ss/matrix.py +84 -83
  31. python-graphblas-2023.7.0/graphblas/core/ss/select.py +45 -0
  32. python-graphblas-2023.7.0/graphblas/core/ss/unary.py +62 -0
  33. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/ss/vector.py +38 -37
  34. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/utils.py +14 -12
  35. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/vector.py +14 -11
  36. python-graphblas-2023.7.0/graphblas/dtypes/__init__.py +43 -0
  37. python-graphblas-2023.7.0/graphblas/dtypes/ss.py +1 -0
  38. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/indexunary/__init__.py +13 -1
  39. python-graphblas-2023.7.0/graphblas/indexunary/ss.py +6 -0
  40. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/io/_awkward.py +58 -52
  41. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/io/_matrixmarket.py +12 -3
  42. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/io/_numpy.py +6 -6
  43. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/monoid/__init__.py +13 -1
  44. {python-graphblas-2023.5.0/graphblas/binary → python-graphblas-2023.7.0/graphblas/monoid}/ss.py +2 -0
  45. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/op/ss.py +2 -0
  46. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/select/__init__.py +19 -7
  47. python-graphblas-2023.7.0/graphblas/select/ss.py +6 -0
  48. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/semiring/ss.py +2 -0
  49. python-graphblas-2023.7.0/graphblas/ss/__init__.py +5 -0
  50. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/ss/_core.py +67 -13
  51. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/conftest.py +33 -6
  52. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/test_core.py +4 -1
  53. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/test_dtype.py +23 -6
  54. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/test_io.py +21 -5
  55. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/test_matrix.py +1 -1
  56. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/test_op.py +14 -2
  57. python-graphblas-2023.7.0/graphblas/tests/test_ssjit.py +269 -0
  58. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/test_vector.py +12 -5
  59. python-graphblas-2023.7.0/graphblas/unary/ss.py +6 -0
  60. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/viz.py +4 -5
  61. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/pyproject.toml +24 -3
  62. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0/python_graphblas.egg-info}/PKG-INFO +25 -8
  63. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/python_graphblas.egg-info/SOURCES.txt +14 -4
  64. python-graphblas-2023.5.0/docs/_static/img/draw-example.png +0 -0
  65. python-graphblas-2023.5.0/docs/_static/img/logo-name-medium.svg +0 -1
  66. python-graphblas-2023.5.0/docs/_static/img/repr-matrix.png +0 -0
  67. python-graphblas-2023.5.0/graphblas/ss/__init__.py +0 -1
  68. python-graphblas-2023.5.0/graphblas/tests/__init__.py +0 -0
  69. python-graphblas-2023.5.0/graphblas/unary/ss.py +0 -3
  70. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/__init__.py +0 -0
  71. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/agg/ss.py +0 -0
  72. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/binary/__init__.py +0 -0
  73. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/binary/numpy.py +0 -0
  74. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/__init__.py +0 -0
  75. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/formatting.py +0 -0
  76. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/infix.py +0 -0
  77. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/infixmethods.py +0 -0
  78. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/operator/__init__.py +0 -0
  79. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/operator/agg.py +0 -0
  80. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/operator/monoid.py +0 -0
  81. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/operator/select.py +0 -0
  82. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/operator/utils.py +0 -0
  83. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/slice.py +0 -0
  84. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/core/ss/prefix_scan.py +0 -0
  85. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/exceptions.py +0 -0
  86. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/graphblas.yaml +0 -0
  87. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/io/__init__.py +0 -0
  88. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/io/_networkx.py +0 -0
  89. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/io/_scipy.py +0 -0
  90. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/io/_sparse.py +0 -0
  91. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/io/_viz.py +0 -0
  92. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/monoid/numpy.py +0 -0
  93. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/op/__init__.py +0 -0
  94. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/op/numpy.py +0 -0
  95. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/semiring/__init__.py +0 -0
  96. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/semiring/numpy.py +0 -0
  97. {python-graphblas-2023.5.0/graphblas/core/ss → python-graphblas-2023.7.0/graphblas/tests}/__init__.py +0 -0
  98. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/pickle1-vanilla.pkl +0 -0
  99. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/pickle1.pkl +0 -0
  100. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/pickle2-vanilla.pkl +0 -0
  101. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/pickle2.pkl +0 -0
  102. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/pickle3-vanilla.pkl +0 -0
  103. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/pickle3.pkl +0 -0
  104. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/test_auto_init.py +0 -0
  105. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/test_descriptor.py +0 -0
  106. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/test_external_init.py +0 -0
  107. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/test_formatting.py +0 -0
  108. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/test_infix.py +0 -0
  109. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/test_mask.py +0 -0
  110. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/test_numpyops.py +0 -0
  111. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/test_operator_types.py +0 -0
  112. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/test_pickle.py +0 -0
  113. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/test_prefix_scan.py +0 -0
  114. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/test_recorder.py +0 -0
  115. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/test_resolving.py +0 -0
  116. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/test_scalar.py +0 -0
  117. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/tests/test_ss_utils.py +0 -0
  118. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/unary/__init__.py +0 -0
  119. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/graphblas/unary/numpy.py +0 -0
  120. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/python_graphblas.egg-info/dependency_links.txt +0 -0
  121. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/python_graphblas.egg-info/requires.txt +0 -0
  122. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/python_graphblas.egg-info/top_level.txt +0 -0
  123. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/setup.cfg +0 -0
  124. {python-graphblas-2023.5.0 → python-graphblas-2023.7.0}/setup.py +0 -0
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2020 Anaconda, Inc
189
+ Copyright 2020-2023 Anaconda, Inc. and contributors
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
@@ -2,11 +2,9 @@ recursive-include graphblas *.py
2
2
  prune docs
3
3
  prune scripts
4
4
  include setup.py
5
+ include conftest.py
5
6
  include README.md
6
7
  include LICENSE
7
8
  include MANIFEST.in
8
9
  include graphblas/graphblas.yaml
9
10
  include graphblas/tests/pickle*.pkl
10
- include docs/_static/img/logo-name-medium.svg
11
- include docs/_static/img/draw-example.png
12
- include docs/_static/img/repr-matrix.png
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-graphblas
3
- Version: 2023.5.0
3
+ Version: 2023.7.0
4
4
  Summary: Python library for GraphBLAS: high-performance sparse linear algebra for scalable graph analytics
5
5
  Author: Jim Kitchen, Python-graphblas contributors
6
6
  Author-email: Erik Welch <erik.n.welch@gmail.com>
@@ -193,7 +193,7 @@ License: Apache License
193
193
  same "printed page" as the copyright notice for easier
194
194
  identification within third-party archives.
195
195
 
196
- Copyright 2020 Anaconda, Inc
196
+ Copyright 2020-2023 Anaconda, Inc. and contributors
197
197
 
198
198
  Licensed under the Apache License, Version 2.0 (the "License");
199
199
  you may not use this file except in compliance with the License.
@@ -248,7 +248,7 @@ Provides-Extra: default
248
248
  Provides-Extra: all
249
249
  License-File: LICENSE
250
250
 
251
- ![Python-graphblas](docs/_static/img/logo-name-medium.svg)
251
+ ![Python-graphblas](https://raw.githubusercontent.com/python-graphblas/python-graphblas/main/docs/_static/img/logo-name-medium.svg)
252
252
 
253
253
  [![conda-forge](https://img.shields.io/conda/vn/conda-forge/python-graphblas.svg)](https://anaconda.org/conda-forge/python-graphblas)
254
254
  [![pypi](https://img.shields.io/pypi/v/python-graphblas.svg)](https://pypi.python.org/pypi/python-graphblas/)
@@ -278,8 +278,8 @@ For algorithms, see
278
278
  - **Chat via Discord:** [https://discord.com/invite/vur45CbwMz](https://discord.com/invite/vur45CbwMz) in the [#graphblas channel](https://discord.com/channels/786703927705862175/1024732940233605190)
279
279
 
280
280
  <p float="left">
281
- <img src="docs/_static/img/draw-example.png" width="231" align="top" alt="Directed graph", title="Directed graph"/>
282
- <img src="docs/_static/img/repr-matrix.png" width="231" align="top" alt="Adjacency matrix" title="Adjacency matrix"/>
281
+ <img src="https://raw.githubusercontent.com/python-graphblas/python-graphblas/main/docs/_static/img/draw-example.png" width="231" align="top" alt="Directed graph", title="Directed graph"/>
282
+ <img src="https://raw.githubusercontent.com/python-graphblas/python-graphblas/main/docs/_static/img/repr-matrix.png" width="231" align="top" alt="Adjacency matrix" title="Adjacency matrix"/>
283
283
  </p>
284
284
 
285
285
  ## Install
@@ -426,8 +426,9 @@ use as well as the blocking/non-blocking mode. If the context is not initialized
426
426
  be performed automatically.
427
427
  ```python
428
428
  import graphblas as gb
429
+
429
430
  # Context initialization must happen before any other imports
430
- gb.init('suitesparse', blocking=True)
431
+ gb.init("suitesparse", blocking=True)
431
432
 
432
433
  # Now we can import other items from graphblas
433
434
  from graphblas import binary, semiring
@@ -445,7 +446,7 @@ def force_odd_func(x):
445
446
  return x + 1
446
447
  return x
447
448
 
448
- unary.register_new('force_odd', force_odd_func)
449
+ unary.register_new("force_odd", force_odd_func)
449
450
 
450
451
  v = Vector.from_coo([0, 1, 3], [1, 2, 3])
451
452
  w = v.apply(unary.force_odd).new()
@@ -453,6 +454,22 @@ w # indexes=[0, 1, 3], values=[1, 3, 3]
453
454
  ```
454
455
  Similar methods exist for BinaryOp, Monoid, and Semiring.
455
456
 
457
+ ## Relation to other network analysis libraries
458
+ Python-graphblas aims to provide an efficient and consistent expression
459
+ of graph operations using linear algebra. This allows the development of
460
+ high-performance implementations of existing and new graph algorithms
461
+ (also see [`graphblas-algorithms`](https://github.com/python-graphblas/graphblas-algorithms)).
462
+
463
+ While end-to-end analysis can be done using `python-graphblas`, users
464
+ might find that other libraries in the Python ecosystem provide a more
465
+ convenient high-level interface for data pre-processing and transformation
466
+ (e.g. `pandas`, `scipy.sparse`), visualization (e.g. `networkx`, `igraph`),
467
+ interactive exploration and analysis (e.g. `networkx`, `igraph`) or for
468
+ algorithms that are not (yet) implemented in `graphblas-algorithms` (e.g.
469
+ `networkx`, `igraph`, `scipy.sparse.csgraph`). To facilitate communication with
470
+ other libraries, `graphblas.io` contains multiple connectors, see the
471
+ following section.
472
+
456
473
  ## Import/Export connectors to the Python ecosystem
457
474
  `graphblas.io` contains functions for converting to and from:
458
475
  ```python
@@ -460,7 +477,7 @@ import graphblas as gb
460
477
 
461
478
  # scipy.sparse matrices
462
479
  A = gb.io.from_scipy_sparse(m)
463
- m = gb.io.to_scipy_sparse(m, format='csr')
480
+ m = gb.io.to_scipy_sparse(m, format="csr")
464
481
 
465
482
  # networkx graphs
466
483
  A = gb.io.from_networkx(g)
@@ -1,4 +1,4 @@
1
- ![Python-graphblas](docs/_static/img/logo-name-medium.svg)
1
+ ![Python-graphblas](https://raw.githubusercontent.com/python-graphblas/python-graphblas/main/docs/_static/img/logo-name-medium.svg)
2
2
 
3
3
  [![conda-forge](https://img.shields.io/conda/vn/conda-forge/python-graphblas.svg)](https://anaconda.org/conda-forge/python-graphblas)
4
4
  [![pypi](https://img.shields.io/pypi/v/python-graphblas.svg)](https://pypi.python.org/pypi/python-graphblas/)
@@ -28,8 +28,8 @@ For algorithms, see
28
28
  - **Chat via Discord:** [https://discord.com/invite/vur45CbwMz](https://discord.com/invite/vur45CbwMz) in the [#graphblas channel](https://discord.com/channels/786703927705862175/1024732940233605190)
29
29
 
30
30
  <p float="left">
31
- <img src="docs/_static/img/draw-example.png" width="231" align="top" alt="Directed graph", title="Directed graph"/>
32
- <img src="docs/_static/img/repr-matrix.png" width="231" align="top" alt="Adjacency matrix" title="Adjacency matrix"/>
31
+ <img src="https://raw.githubusercontent.com/python-graphblas/python-graphblas/main/docs/_static/img/draw-example.png" width="231" align="top" alt="Directed graph", title="Directed graph"/>
32
+ <img src="https://raw.githubusercontent.com/python-graphblas/python-graphblas/main/docs/_static/img/repr-matrix.png" width="231" align="top" alt="Adjacency matrix" title="Adjacency matrix"/>
33
33
  </p>
34
34
 
35
35
  ## Install
@@ -176,8 +176,9 @@ use as well as the blocking/non-blocking mode. If the context is not initialized
176
176
  be performed automatically.
177
177
  ```python
178
178
  import graphblas as gb
179
+
179
180
  # Context initialization must happen before any other imports
180
- gb.init('suitesparse', blocking=True)
181
+ gb.init("suitesparse", blocking=True)
181
182
 
182
183
  # Now we can import other items from graphblas
183
184
  from graphblas import binary, semiring
@@ -195,7 +196,7 @@ def force_odd_func(x):
195
196
  return x + 1
196
197
  return x
197
198
 
198
- unary.register_new('force_odd', force_odd_func)
199
+ unary.register_new("force_odd", force_odd_func)
199
200
 
200
201
  v = Vector.from_coo([0, 1, 3], [1, 2, 3])
201
202
  w = v.apply(unary.force_odd).new()
@@ -203,6 +204,22 @@ w # indexes=[0, 1, 3], values=[1, 3, 3]
203
204
  ```
204
205
  Similar methods exist for BinaryOp, Monoid, and Semiring.
205
206
 
207
+ ## Relation to other network analysis libraries
208
+ Python-graphblas aims to provide an efficient and consistent expression
209
+ of graph operations using linear algebra. This allows the development of
210
+ high-performance implementations of existing and new graph algorithms
211
+ (also see [`graphblas-algorithms`](https://github.com/python-graphblas/graphblas-algorithms)).
212
+
213
+ While end-to-end analysis can be done using `python-graphblas`, users
214
+ might find that other libraries in the Python ecosystem provide a more
215
+ convenient high-level interface for data pre-processing and transformation
216
+ (e.g. `pandas`, `scipy.sparse`), visualization (e.g. `networkx`, `igraph`),
217
+ interactive exploration and analysis (e.g. `networkx`, `igraph`) or for
218
+ algorithms that are not (yet) implemented in `graphblas-algorithms` (e.g.
219
+ `networkx`, `igraph`, `scipy.sparse.csgraph`). To facilitate communication with
220
+ other libraries, `graphblas.io` contains multiple connectors, see the
221
+ following section.
222
+
206
223
  ## Import/Export connectors to the Python ecosystem
207
224
  `graphblas.io` contains functions for converting to and from:
208
225
  ```python
@@ -210,7 +227,7 @@ import graphblas as gb
210
227
 
211
228
  # scipy.sparse matrices
212
229
  A = gb.io.from_scipy_sparse(m)
213
- m = gb.io.to_scipy_sparse(m, format='csr')
230
+ m = gb.io.to_scipy_sparse(m, format="csr")
214
231
 
215
232
  # networkx graphs
216
233
  A = gb.io.from_networkx(g)
@@ -0,0 +1,42 @@
1
+ def pytest_addoption(parser):
2
+ parser.addoption(
3
+ "--backend",
4
+ action="store",
5
+ default=None,
6
+ help="name of a graphblas backend",
7
+ )
8
+ parser.addoption("--runslow", default=None, action="store_true", help="run slow tests")
9
+ parser.addoption(
10
+ "--blocking",
11
+ dest="blocking",
12
+ default=None,
13
+ action="store_true",
14
+ help="run in blocking mode",
15
+ )
16
+ parser.addoption(
17
+ "--nonblocking",
18
+ "--no-blocking",
19
+ "--noblocking",
20
+ "--non-blocking",
21
+ dest="blocking",
22
+ action="store_false",
23
+ help="run in non-blocking mode",
24
+ )
25
+ parser.addoption(
26
+ "--record",
27
+ dest="record",
28
+ default=None,
29
+ action="store_true",
30
+ help="Record GraphBLAS C calls and save to 'record.txt'",
31
+ )
32
+ parser.addoption(
33
+ "--mapnumpy", action="store_true", default=None, help="map numpy ops to GraphBLAS ops"
34
+ )
35
+ parser.addoption(
36
+ "--nomapnumpy",
37
+ "--no-mapnumpy",
38
+ dest="mapnumpy",
39
+ action="store_false",
40
+ help="don't map numpy ops to GraphBLAS ops",
41
+ )
42
+ parser.addoption("--randomly", action="store_true", help="run random test config")
@@ -1,4 +1,4 @@
1
- """`graphblas.agg` is an experimental module for exploring Aggregators.
1
+ """``graphblas.agg`` is an experimental module for exploring Aggregators.
2
2
 
3
3
  Aggregators may be used in reduce methods:
4
4
  - Matrix.reduce_rowwise
@@ -59,9 +59,9 @@ Custom recipes (specific to SuiteSparse:GraphBLAS):
59
59
  - ss.argmax
60
60
 
61
61
  .. deprecated:: 2023.1.0
62
- Aggregators `first`, `last`, `first_index`, `last_index`, `argmin`, and `argmax` are
63
- deprecated in the `agg` namespace such as `agg.first`. Use them from `agg.ss` namespace
64
- instead such as `agg.ss.first`. Will be removed in version 2023.9.0 or later.
62
+ Aggregators ``first``, ``last``, ``first_index``, ``last_index``, ``argmin``, and ``argmax``
63
+ are deprecated in the ``agg`` namespace such as ``agg.first``. Use them from ``agg.ss``
64
+ namespace instead such as ``agg.ss.first``. Will be removed in version 2023.9.0 or later.
65
65
 
66
66
  # Possible aggregators:
67
67
  # - absolute_deviation, sum(abs(x - mean(x))), sum_absminus(x, mean(x))
@@ -0,0 +1,6 @@
1
+ from ..core import operator
2
+ from ..core.ss.binary import register_new # noqa: F401
3
+
4
+ _delayed = {}
5
+
6
+ del operator
@@ -1,8 +1,8 @@
1
1
  """graphblas.core.agg namespace is deprecated; please use graphblas.core.operator.agg instead.
2
2
 
3
3
  .. deprecated:: 2023.3.0
4
- `graphblas.core.agg` will be removed in a future release.
5
- Use `graphblas.core.operator.agg` instead.
4
+ ``graphblas.core.agg`` will be removed in a future release.
5
+ Use ``graphblas.core.operator.agg`` instead.
6
6
  Will be removed in version 2023.11.0 or later.
7
7
 
8
8
  """
@@ -1,6 +1,6 @@
1
1
  """Define functions to use as property methods on expressions.
2
2
 
3
- These will automatically compute the value and avoid the need for `.new()`.
3
+ These will automatically compute the value and avoid the need for ``.new()``.
4
4
 
5
5
  To automatically create the functions, run:
6
6
 
@@ -348,7 +348,7 @@ class BaseType:
348
348
  return
349
349
  if opts:
350
350
  # Ignore opts for now
351
- descriptor_lookup(**opts)
351
+ desc = descriptor_lookup(**opts)
352
352
  self.value = expr
353
353
  return
354
354
 
@@ -371,7 +371,7 @@ class BaseType:
371
371
  else:
372
372
  if opts:
373
373
  # Ignore opts for now
374
- descriptor_lookup(**opts)
374
+ desc = descriptor_lookup(**opts)
375
375
  self.value = expr
376
376
  return
377
377
  else:
@@ -571,7 +571,7 @@ class BaseExpression:
571
571
  ):
572
572
  if opts:
573
573
  # Ignore opts for now
574
- descriptor_lookup(**opts)
574
+ desc = descriptor_lookup(**opts) # noqa: F841 (keep desc in scope for context)
575
575
  if self._is_scalar and self._value._is_cscalar != is_cscalar:
576
576
  return self._value.dup(is_cscalar=is_cscalar, name=name)
577
577
  rv = self._value
@@ -26,6 +26,7 @@ class Descriptor:
26
26
  self.mask_structure = mask_structure
27
27
  self.transpose_first = transpose_first
28
28
  self.transpose_second = transpose_second
29
+ self._context = None # Used by SuiteSparse:GraphBLAS 8
29
30
 
30
31
  @property
31
32
  def _carg(self):