-
-
Notifications
You must be signed in to change notification settings - Fork 589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I1906 solution json #1909
I1906 solution json #1909
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1909 +/- ##
========================================
Coverage 99.32% 99.32%
========================================
Files 346 346
Lines 19121 19135 +14
========================================
+ Hits 18992 19006 +14
Misses 129 129
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good to me!
|
||
# check if string has the right values | ||
json_data = json.loads(json_str) | ||
np.testing.assert_array_almost_equal(json_data["c"], solution.data["c"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is it only almost equal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was only copying the other lines of this test. But it would need to be almost equal, as the numbers (e.g. 1/3) will be rounded off when they are written to json
Description
Solution.save_data()
to return a string if filename is Noneto_format
of jsonFixes #1906
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.
Key checklist:
$ flake8
$ python run-tests.py --unit
$ cd docs
and then$ make clean; make html
You can run all three at once, using
$ python run-tests.py --quick
.Further checks: