-
-
Notifications
You must be signed in to change notification settings - Fork 421
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
Fixed the array types when interpolate_shells > 0. Now returns the p… #1464
Conversation
…oper pandas series that are required for the cython formal integral wrapper
Codecov Report
@@ Coverage Diff @@
## master #1464 +/- ##
==========================================
- Coverage 71.13% 70.00% -1.14%
==========================================
Files 67 67
Lines 5523 5314 -209
==========================================
- Hits 3929 3720 -209
Misses 1594 1594
Continue to review full report at Codecov.
|
Should also be of note: This bug really demonstrates the need for formal integral tests |
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 for fixing my blunder ;)
I also agree that we should include a test with interpolate_shells > 0, which is the setting people should be using. |
I took the liberty to merge this without a second review. The changes are minimal and fix an urgent problem. |
Now returns the proper pandas series that are required for the cython formal integral wrapper (tardis-sn#1464)
When interpolate_shells > 0, the formal integral broke with an attribute error claiming that numpy arrays had no attribute "values"
Issue #1463
I've corrected the return types of one of the functions so that they are no longer numpy arrays.
Description
When interpolate_shells > 0,
interpolate_integrator_quantities
would change the type of electron_densities_integ, tau_sobolev_integ, and Jredlu from pandas dataframes or series to numpy arrays due to the fact thatscipy.interp1d
always returns a numpy array. This was problematic because the formal_integral Cython wrapper access the.values
attributes of these arrays assuming they were pandas objects. I've corrected this so now these arrays are set to have the correct type.Motivation and Context
Now interpolate_shells can have values greater than 0 without failing.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: