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

QuantEcon / QuantEcon.py / 35816136720
94%

Build:
DEFAULT BRANCH: main
Ran 23 Sep 2026 03:58AM 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

23 Sep 2026 03:53AM UTC coverage: 93.981% (+0.01%) from 93.967%
35816136720

push

github

web-flow
FIX: game_converters: Number formats in the .gam reader and writer (#970)

* FIX: game_converters: Read numbers with an exponent and no decimal point

`_str2num` chose between `int` and `float` by whether the token contains
a decimal point, so that tokens such as `1e3` were passed to `int` and
rejected. Try `int` first and fall back to `float` instead.

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

* ENH: game_converters: Parse rational tokens `n/d` in `_str2num`

Convert a token of the form `n/d` to the nearest float. This is for the
upcoming reader for the Gambit .nfg format, where rational payoffs are
part of the format, and which will share this function. For the .gam
format it is left unspecified.

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

* FIX: to_gam: Write floats without loss of precision

`np.array2string` was called with the default precision of 8 digits, so
that a payoff such as 1/3 or 0.1 + 0.2 was not recovered by reading the
output back. Format each float with `np.format_float_positional`, which
gives the shortest representation that round-trips and never uses the
exponent notation. This is also much faster: 0.27 s instead of 18.5 s
for a game with 648,000 payoffs.

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

* FIX: to_gam: Write bool payoffs as 0 and 1

A game with payoffs of dtype bool was written with `True` and `False`,
which `from_gam_string` rejects. Write them as `0` and `1`.

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

* TEST: to_gam: Add boundary values and independence of print options

* Test the writer with signed zeros, subnormal values, and the largest
  finite values, comparing signs as well as values
* Test that the output does not depend on the print options of NumPy
* State in `test_gam_writer_float_precision` what is tested for
  float32: a payoff is written with the shortest representation among
  float32 values and is read as float64, so that the original value... (continued)

19 of 19 new or added lines in 1 file covered. (100.0%)

5496 of 5848 relevant lines covered (93.98%)

0.94 hits per line

Jobs
ID Job ID Ran Files Coverage
1 35816136720.1 23 Sep 2026 03:58AM UTC 94
93.98
GitHub Action Run
Source Files on build 35816136720
  • Tree
  • List 94
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #35816136720
  • b5a05ab5 on github
  • Prev Build on main (#35310792136)
  • Next Build on main (#35817078287)
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