as_integer
Full name: ase2sprkkr.common.misc.as_integer
- ase2sprkkr.common.misc.as_integer(value)[source]
Interpret the value as integer, or raise (even for float, complex etc.) TypeError.i >>> as_integer(4) 4 >>> as_integer(np.int64(4)) 4 >>> as_integer(4.0) Traceback (most recent call last): … TypeError: ‘float’ object cannot be interpreted as an integer