less picky on allowed datatypes
This commit is contained in:
parent
461611cde7
commit
b00581f1be
|
@ -83,7 +83,7 @@ class Geom():
|
||||||
if microstructure is not None:
|
if microstructure is not None:
|
||||||
if len(microstructure.shape) != 3:
|
if len(microstructure.shape) != 3:
|
||||||
raise ValueError('Invalid microstructure shape {}'.format(*microstructure.shape))
|
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))
|
raise TypeError('Invalid data type {} for microstructure'.format(microstructure.dtype))
|
||||||
else:
|
else:
|
||||||
self.microstructure = np.copy(microstructure)
|
self.microstructure = np.copy(microstructure)
|
||||||
|
|
Loading…
Reference in New Issue