keep float datatype

based on the assumption, that no mixed float/int data is stored
This commit is contained in:
Martin Diehl 2019-05-27 09:56:15 +02:00
parent 6e06764e2d
commit 615a4ab40f
1 changed files with 2 additions and 2 deletions

View File

@ -162,9 +162,9 @@ class Geom():
microstructure = microstructure.reshape(grid,order='F') microstructure = microstructure.reshape(grid,order='F')
if np.any(np.mod(microstructure.flatten(),1)!=0.0): if '.' in raw[0]: # contains float values
pass pass
else: else: # assume int values
microstructure = microstructure.astype('int') microstructure = microstructure.astype('int')
return cls(microstructure.reshape(grid),size,homogenization,comments) return cls(microstructure.reshape(grid),size,homogenization,comments)