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

QuantEcon / QuantEcon.py / 29001757894
94%

Build:
DEFAULT BRANCH: main
Ran 09 Jul 2026 07:34AM UTC
Jobs 1
Files 156
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

09 Jul 2026 07:30AM UTC coverage: 93.607% (+0.05%) from 93.561%
29001757894

push

github

web-flow
BUG: Fix DiscreteDP input validation and iteration edge cases (#855)

* BUG: Fix DiscreteDP input validation and iteration edge cases

- Raise ValueError on duplicate state-action pairs, which previously
  either raised an uninformative IndexError or silently constructed a
  corrupted instance (coo_matrix.tocsr() sums the duplicated pointer
  entries)
- Handle trailing states with no action: bound the s_indices walk in
  _generate_a_indptr (previously an unchecked out-of-bounds read under
  numba) and pass the shape to coo_matrix explicitly, so that the
  informative feasibility ValueError is raised; check action
  availability before the R_max check in _check_action_feasibility
- Fix operator_iteration to return 0 (not a tuple) when max_iter <= 0,
  and raise ValueError for max_iter < 1 in the solution methods
- Validate beta at the top of __init__; fix docstring typos

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

* FIX: Validate index ranges of s_indices and a_indices in DiscreteDP

On the sorted state-action path, an out-of-range state index (e.g.
s_indices=[0, 2] with num_states=2) was silently accepted, with the pair
reattributed to a lower state; on the unsorted path it raised only a
cryptic scipy shape error. Validate the ranges explicitly before
branching, covering both paths with a clear message. Also test
max_iter=-1 in addition to max_iter=0.

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

* FIX: Interpolate num_states into the s_indices range error message

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

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

75 of 76 new or added lines in 2 files covered. (98.68%)

8156 of 8713 relevant lines covered (93.61%)

0.94 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
94.93
0.25% quantecon/markov/ddp.py
Jobs
ID Job ID Ran Files Coverage
1 29001757894.1 09 Jul 2026 07:34AM UTC 156
93.61
GitHub Action Run
Source Files on build 29001757894
  • Tree
  • List 156
  • Changed 3
  • Source Changed 3
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29001757894
  • 1c841dd2 on github
  • Prev Build on main (#28913734932)
  • Next Build on main (#29061656443)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc