• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

QuantEcon / QuantEcon.py / 41353402460
94%

Build:
DEFAULT BRANCH: main
Ran 01 Nov 2026 09:46PM UTC
Jobs 1
Files 94
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Nov 2026 09:42PM UTC coverage: 94.141% (+0.007%) from 94.134%
41353402460

push

github

web-flow
ENH: accept scipy sparse array input (#1004)

* MAINT: require scipy>=1.11 and numpy>=1.21.6

SciPy 1.11 introduced the public scipy.sparse.sparray base class, which the
upcoming support for sparse-array input relies on. Raise the floor from 1.5
accordingly, and raise the NumPy floor from 1.17 to 1.21.6, the minimum
SciPy 1.11 itself requires. The docs build requirements follow suit.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* ENH: accept scipy sparse arrays in DiGraph, preserving the input family

DiGraph converted any input with scipy.sparse.csr_matrix(adj_matrix, dtype),
which turns a sparse-array (sparray) input into the old sparse-matrix
family. Dispatch on isinstance(adj_matrix, sparse.sparray) and convert such
input with csr_array instead; dense and sparse-matrix input still go through
the unchanged csr_matrix call, so nothing changes for existing callers.

Tests: build sparse-input versions of every fixture graph in both families,
parametrize the subgraph and validation tests over dense/csr_matrix/csr_array
input, and assert that the family and dtype of csgraph follow the input while
random_tournament_graph still returns a csr_matrix.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* ENH: accept scipy sparse arrays in MarkovChain, preserving the input family

MarkovChain converted any sparse input with scipy.sparse.csr_matrix(P),
which turns a sparse-array (sparray) input into the old sparse-matrix
family. Dispatch on isinstance(P, sparse.sparray) and convert such input
with csr_array instead; sparse-matrix and dense input still go through the
unchanged csr_matrix and np.asarray calls, so nothing changes for existing
callers.

The row-sum validation relied on the np.matrix method getA1, which does not
exist on the 1-D ndarray that csr_array.sum(axis=1) returns. Replace it with
np.asarray(P.sum(axis=1)).ravel(), which yields the same 1-D array for dense,
csr_matrix and csr_array storage.

Tests: build sparse-input ve... (continued)

15 of 15 new or added lines in 4 files covered. (100.0%)

5688 of 6042 relevant lines covered (94.14%)

0.94 hits per line

Jobs
ID Job ID Ran Files Coverage
1 41353402460.1 01 Nov 2026 09:46PM UTC 94
94.14
GitHub Action Run
Source Files on build 41353402460
  • Tree
  • List 94
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41353402460
  • d30c9000 on github
  • Prev Build on main (#40816254160)
  • Next Build on main (#44057421778)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc