From b00581f1be8b03fb2377e7f5f8784c7e1a31dd9e Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 30 May 2019 13:29:29 +0200 Subject: [PATCH] less picky on allowed datatypes --- python/damask/geom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/damask/geom.py b/python/damask/geom.py index 397684fe1..e422516a7 100644 --- a/python/damask/geom.py +++ b/python/damask/geom.py @@ -83,7 +83,7 @@ class Geom(): if microstructure is not None: if len(microstructure.shape) != 3: raise ValueError('Invalid microstructure shape {}'.format(*microstructure.shape)) - elif microstructure.dtype not in [int,float]: + elif microstructure.dtype not in np.sctypes['float'] + np.sctypes['int']: raise TypeError('Invalid data type {} for microstructure'.format(microstructure.dtype)) else: self.microstructure = np.copy(microstructure)