Skip to content

Commit 12e2d35

Browse files
committed
fix(array): skip hash and eq usage on array
1 parent 45a0ad5 commit 12e2d35

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/trame_vtk/modules/vtk/serializers/helpers.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
# -----------------------------------------------------------------------------
1010

1111

12+
def is_array_in(array, arrays):
13+
for a in arrays:
14+
if a is array:
15+
return True
16+
return False
17+
18+
1219
def data_table_to_list(data_table):
1320
data_type = array_types_mapping[data_table.GetDataType()]
1421
element_size = struct.calcsize(data_type)
@@ -148,7 +155,7 @@ def extract_required_fields(
148155
]:
149156
for array_index in range(field_data.GetNumberOfArrays()):
150157
array = field_data.GetArray(array_index)
151-
if export_all or array in arrays_to_export:
158+
if export_all or is_array_in(array, arrays_to_export):
152159
array_meta = get_array_description(array, context)
153160
if array_meta:
154161
array_meta["location"] = location

0 commit comments

Comments
 (0)