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
Describe the bug
Attempted to use custom transformation, using an outside library.
I see that the VTKnumpy array received is a (M, N, 1) for a (M, N) array.
Most operations outside of numpy will not conserve (M, N, 1) and will return (M, N) for 2D operations.
Before returning the result you need to use:
np.reshape( M, N, 1)
If you don't realize this you will get the following error.
_Warning, array does not have Fortran order, making deep copy and fixing...
...done.
Traceback (most recent call last):
File "Transform Data", line 15, in transform
File "C:\Users\michn\anaconda3\envs\tomviz\Library\lib\tomviz\site-packages\tomviz\internal_dataset.py", line 17, in active_scalars
utils.set_array(self.data_object, v)
File "C:\Users\michn\anaconda3\envs\tomviz\Library\lib\tomviz\site-packages\tomviz_internal.py", line 248, in wrapped
return f(*args, **kwargs)
File "C:\Users\michn\anaconda3\envs\tomviz\Library\lib\tomviz\site-packages\tomviz\utils.py", line 130, in set_array
[x + y - 1 for (x, y) in zip(minextent, vtkshape)]
ValueError: attempt to assign sequence of size 2 to extended slice of size 3
critical: In unknown, line 0
critical: Failed to execute the script.
I'm not sure this is the expected behavior?
The text was updated successfully, but these errors were encountered:
Describe the bug
Attempted to use custom transformation, using an outside library.
I see that the VTKnumpy array received is a (M, N, 1) for a (M, N) array.
Most operations outside of numpy will not conserve (M, N, 1) and will return (M, N) for 2D operations.
Before returning the result you need to use:
np.reshape( M, N, 1)
If you don't realize this you will get the following error.
_Warning, array does not have Fortran order, making deep copy and fixing...
...done.
Traceback (most recent call last):
File "Transform Data", line 15, in transform
File "C:\Users\michn\anaconda3\envs\tomviz\Library\lib\tomviz\site-packages\tomviz\internal_dataset.py", line 17, in active_scalars
utils.set_array(self.data_object, v)
File "C:\Users\michn\anaconda3\envs\tomviz\Library\lib\tomviz\site-packages\tomviz_internal.py", line 248, in wrapped
return f(*args, **kwargs)
File "C:\Users\michn\anaconda3\envs\tomviz\Library\lib\tomviz\site-packages\tomviz\utils.py", line 130, in set_array
[x + y - 1 for (x, y) in zip(minextent, vtkshape)]
ValueError: attempt to assign sequence of size 2 to extended slice of size 3
critical: In unknown, line 0
critical: Failed to execute the script.
I'm not sure this is the expected behavior?
The text was updated successfully, but these errors were encountered: