Skip to content

Commit a90cf76

Browse files
committed
fix: array view bug
1 parent c52ee15 commit a90cf76

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ansys/dpf/core/field_base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,8 @@ def data_as_list(self):
504504

505505
@data.setter
506506
def data(self, data):
507+
if isinstance(data, (np.ndarray, np.generic)):
508+
data = data.copy()
507509
self._set_data(data)
508510

509511
@abstractmethod

0 commit comments

Comments
 (0)