-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add DataFrame.min and DataFrame.max over 'set_ids' axis or MeshIndex #333
Conversation
df = simulation.displacement(all_sets=True) | ||
# Over the mesh entities | ||
min_over_mesh = [[-0.00074732, -0.00040138, -0.00021555]] | ||
assert np.all(np.isclose(df.min()._fc[0].data.tolist(), min_over_mesh)) |
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.
Is it expected to expose and use a protected attribute _fc
for the field containers?
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.
@MaxJPRey not to the user. We do have ._core_object
property though which we will implement for all classes wrapping a Core entity to give easy access in case it is needed.
Here in the tests this allows me to compare the result of the max operation with doing the same thing directly on the data held by the underlying fields container.
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.
OK, got it. Thanks for the info.
src/ansys/dpf/post/dataframe.py
Outdated
Defaults to the MeshIndex (0). | ||
Can also be the SetIndex (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.
Maybe here we could add additional info just to remind what are the MeshIndex
and SetIndex
for new users.
I don't remember if it is done somewhere else.
Codecov Report
@@ Coverage Diff @@
## master #333 +/- ##
==========================================
+ Coverage 82.72% 82.94% +0.22%
==========================================
Files 35 35
Lines 3173 3214 +41
==========================================
+ Hits 2625 2666 +41
Misses 548 548 |
""" | ||
.. _ref_compute_statistics_example: | ||
|
||
Compute statistics of a DataFrame |
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.
@PProfizi I don't see the mean in this example, can we ranme compute min max then? Adding @JennaPaikowsky to review
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.
@cbellot000 the idea was to create this example now with min and max, and add to it as new features like mean are done
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 understand but I think statistics is bit misleading. Personally, when I'm looking to compute a min max over time (which is a recurring need), I don't search for "statistics"
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.
@cbellot000 I understand. I am renaming it, and we will see how to reorganize once there are more features.
No description provided.