Skip to content

Commit

Permalink
Convert slice to list also in example
Browse files Browse the repository at this point in the history
  • Loading branch information
janvonrickenbach committed Apr 4, 2024
1 parent 872439a commit 81e0257
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/006_filter_composite_data_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@
)

value = stress_data[selected_indices][:, component]
local_result_field.append(value, element_id)
# value needs to be passed as list because dpf does not support numpyy
# slices in the append call.
local_result_field.append(list(value), element_id)

composite_model.get_mesh().plot(result_field)

Expand Down

0 comments on commit 81e0257

Please sign in to comment.