Skip to content
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

Memory sharing issues after PyVista 0.37 for RectilinearGrid #44

Open
banesullivan opened this issue Nov 11, 2022 · 4 comments
Open

Memory sharing issues after PyVista 0.37 for RectilinearGrid #44

banesullivan opened this issue Nov 11, 2022 · 4 comments
Labels
bug Something isn't working stale

Comments

@banesullivan
Copy link
Member

See 0e64e7d

pyvista/pyvista#3179 broke the test_convert_vtr test when it validates that the X and Y coordinates share memory but not Z. This is super odd and I cannot figure out what is going wrong as the changes in pyvista/pyvista#3179 do not seemingly affect this. So for some reason X and Y are DEEP copied now while Z is still SHALLOW copied.

@MatthewFlamm, I hate to throw you in the deep end but I'm wondering if you might have any insights come to mind as to why that pull request would have broken this test.

@banesullivan banesullivan added the bug Something isn't working label Nov 11, 2022
@banesullivan
Copy link
Member Author

the reality is that a lot of the code here in pyvista-xarray for ensuring shared arrays is very fragile and needs major improvement

@MatthewFlamm
Copy link

This is weird. This test does not pass in a vtk object at all to Rectilinear Grid as far as I can tell. One line reads in a file, the other instantiates a blank object and then manually constructs it via attributes here

if x is not None:
self._mesh.x = self._get_array(x)
if y is not None:
self._mesh.y = self._get_array(y)
if z is not None:
self._mesh.z = self._get_array(z)

Other weird thing is that the prior behavior for Rectilinear grid was to always deep copy vtk objects.

@MatthewFlamm
Copy link

Have you bisected it to this exact commit in PyVista? Or just by version?

@banesullivan
Copy link
Member Author

I bisected, and it was the commit for pyvista/pyvista#3179

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants