-
Notifications
You must be signed in to change notification settings - Fork 59
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
ENH: add a method that creates a grid property between two input surfaces #1291
Conversation
@@ -5,7 +5,7 @@ ignore_missing_imports = True | |||
strict_equality = True | |||
warn_redundant_casts = True | |||
warn_unused_configs = True | |||
warn_unused_ignores = True | |||
warn_unused_ignores = False |
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.
Changed this as it seems that mypy messages are incorrect (the # type: ignore is needed, but mypy claims it is not)
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.
Just an aside, but I've found this usually to happen when some imports are not quite right in some way
} | ||
} | ||
return std::make_tuple(xmid, ymid, zmid); | ||
} |
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.
As a note, manual testing indicates that this function in pybind11 is 2-3 times faster than the corresponding function using swig (which it now replaces).
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1291 +/- ##
==========================================
+ Coverage 80.02% 81.12% +1.09%
==========================================
Files 98 94 -4
Lines 13680 12480 -1200
Branches 2203 1882 -321
==========================================
- Hits 10948 10124 -824
+ Misses 1999 1692 -307
+ Partials 733 664 -69 ☔ View full report in Codecov by Sentry. |
a3088c7
to
54b549f
Compare
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.
Great new functionality in the xtgeo toolbox 👍
Only commenting on the python part here.
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.
Nice to see two more C files ported over 👍
@@ -5,7 +5,7 @@ ignore_missing_imports = True | |||
strict_equality = True | |||
warn_redundant_casts = True | |||
warn_unused_configs = True | |||
warn_unused_ignores = True | |||
warn_unused_ignores = False |
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.
Just an aside, but I've found this usually to happen when some imports are not quite right in some way
src/xtgeo/grid3d/_grid_etc1.py
Outdated
is_discrete = True | ||
|
||
if isinstance(value, float): | ||
array = array.astype(float) * value |
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.
If array is an py::array<bool>
I think this should be a bit more performant as well
fd3f8b5
to
272bcbb
Compare
Solves #1290 as derived task from https://github.com/equinor/fmu-orion-playground/issues/19
Contributes also to #1247