From 615a4ab40fed01db7a11394ab2105f266e759c9d Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 27 May 2019 09:56:15 +0200 Subject: [PATCH] keep float datatype based on the assumption, that no mixed float/int data is stored --- python/damask/geom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/damask/geom.py b/python/damask/geom.py index 5702c1950..bbe36595b 100644 --- a/python/damask/geom.py +++ b/python/damask/geom.py @@ -162,9 +162,9 @@ class Geom(): microstructure = microstructure.reshape(grid,order='F') - if np.any(np.mod(microstructure.flatten(),1)!=0.0): + if '.' in raw[0]: # contains float values pass - else: + else: # assume int values microstructure = microstructure.astype('int') return cls(microstructure.reshape(grid),size,homogenization,comments)