-
-
Notifications
You must be signed in to change notification settings - Fork 553
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
Issue 1276 add models #1408
Issue 1276 add models #1408
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1408 +/- ##
===========================================
+ Coverage 98.22% 98.27% +0.04%
===========================================
Files 278 278
Lines 15804 16111 +307
===========================================
+ Hits 15524 15833 +309
+ Misses 280 278 -2
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.
Looks good Tino, thanks!
if isinstance(solution, pybamm.Solution): | ||
final_state = final_state.data | ||
if final_state.ndim == 1: | ||
final_state_eval = np.array([final_state[-1]]) | ||
final_state_eval = final_state[-1:] |
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.
Probably a stupid question, but is this colon necessary?
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.
Yeah, just discovered this in python, it returns an array (which is needed) instead of a scalar
np.array([1,2,3])[-1] # --> 3
np.array([1,2,3])[-1:] # --> np.array([3])
Description
Solution
that consists of stepping different modelsFixes #1276
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: