From e2fe40c460ef711d44cfb4697242481014a826f4 Mon Sep 17 00:00:00 2001 From: Michael Krayer Date: Thu, 27 May 2021 23:39:13 +0200 Subject: [PATCH] use ravel since it doesnt always copy --- field.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/field.py b/field.py index f10d13b..72fc20a 100644 --- a/field.py +++ b/field.py @@ -273,7 +273,8 @@ class Field3d: mesh.dimensions = self.dim(axis=None) mesh.origin = self.origin mesh.spacing = self.spacing - mesh.point_arrays['data'] = self.data.flatten(order='F') + # order needs to be F no matter how array is stored in memory + mesh.point_arrays['data'] = self.data.ravel(order='F') return mesh def vtk_contour(self,val):