-
Notifications
You must be signed in to change notification settings - Fork 18
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
Upgrade Code for numpy 1.20 compatibility #555
Conversation
Sourcery Code Quality ReportMerging this PR leaves code quality unchanged.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Let us know what you think of it by mentioning @sourcery-ai in a comment. |
Kudos, SonarCloud Quality Gate passed! |
Codecov Report
@@ Coverage Diff @@
## main #555 +/- ##
=====================================
Coverage 74.0% 74.0%
=====================================
Files 58 58
Lines 3378 3378
Branches 639 639
=====================================
Hits 2500 2500
Misses 736 736
Partials 142 142
Continue to review full report at Codecov.
|
@@ -61,7 +61,7 @@ class SimpleTestModel(Model): | |||
|
|||
|
|||
def calculate_kinetic(dataset_descriptor=None, axis=None, index=None, extra_stuff=None): | |||
kinpar = -1 * np.array(dataset_descriptor.kinetic) | |||
kinpar = -1 * np.asarray(dataset_descriptor.kinetic) |
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.
Either version of the code works for me (to pass all 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.
LGTM
* Fixed Parameter.__array__ * bumped versions of dependencies: - numpy - asteval - xarray
Refactored code for numpy 1.20 compatibility.