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 some old tutorials. #591
Conversation
Replaced deprecated method 'label' with 'vector_text'. Also eliminated the "true division" runtime warning.
Codecov Report
@@ Coverage Diff @@
## master #591 +/- ##
==========================================
- Coverage 87.96% 87.94% -0.02%
==========================================
Files 62 62
Lines 13099 13099
Branches 1316 1316
==========================================
- Hits 11522 11520 -2
- Misses 1201 1202 +1
- Partials 376 377 +1
|
All actors' centers currently must be a ndarray.
Replaced deprecated method 'label' with 'vector_text'.
This line of code was triggering an error in "viz_sphere" and "viz_timer" tutorials.
Tests made me notice that radii can be either a float or a ndarray.
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, @m-agour for this PR.
Please take a look at my comment below. Thanks
fury/actor.py
Outdated
if type(radii) in [float, int]: | ||
scales = np.array([1, 1, 1]) * radii | ||
else: | ||
scales = np.array([1, 1, 1]) * radii[:, None] |
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.
This works perfectly fine @m-agour ,
You may also use scales = np.array(radii)
as repeat_primitive
handles the reshaping of the scales array.
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.
Hello @xtanion,
Thank you for reviewing my PR.
The compact solution you mentioned works just fine. Thanks for mentioning it.
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.
Hey @m-agour ,
All your changes are perfectly fine!!
There is just an issue with the sphere texture in viz_earth_animation
which is inverted horizontally as shown below!!
Hello @ganimtron-10, |
No need to do any checks of conversions since it's all done inside the repeat_primitive function. Co-Authored-By: Shivam Anand <74976752+xtanion@users.noreply.github.com>
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.
Thank you for this @m-agour,
Overall, looks good to me. Good catch for the reverted earth @ganimtron-10! I think, this should be fixed in a new PR otherwise the title will not correspond to the change.
So, I will go ahead and merge it. Thanks all
label
and fixed some old tutorials.
label
and fixed some old tutorials.
Replaced deprecated method 'label' with 'vector_text'.
Also eliminated the "true division" runtime warning.