You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In essence though, Python variables are C-references (e.g. int& var) and they are "pass by assignment", whereas in C variables copy by default and are pass by copy (value) by default.
The text was updated successfully, but these errors were encountered:
Describe the bug, what's wrong, and what you expected.
As revealed in PR #3170, accessing certain dataset attributes in function scopes causes side effects: mutations of arrays. Specifically, we saw:
volume.active_scalars
inplotting.add_volume
led to
volume['Spatial Point Data']
from theexamples.load_uniform()
dataset getting mutated (it was rescaled to the0-255
range)and attempting to loop through
led
name
to maintain a reference to the last element involume.array_names
, causing the last item oftest_plot_helper_two_volumes
to not be plotted:Steps to reproduce the bug.
Please see the problem description.
System Information
Screenshots
Please see the problem description.
NB: I highly recommend watching:
to best understand what is going on here.
In essence though, Python variables are C-references (e.g.
int& var
) and they are "pass by assignment", whereas in C variables copy by default and are pass by copy (value) by default.The text was updated successfully, but these errors were encountered: