python3 does not allow to compare tuple/list with int

This commit is contained in:
Martin Diehl 2018-11-17 09:29:05 +01:00
parent 30e00175f1
commit 015e819d4c
1 changed files with 3 additions and 3 deletions

View File

@ -245,9 +245,9 @@ for name in filenames:
hasEulers = table.label_dimension(options.eulers) == 3 hasEulers = table.label_dimension(options.eulers) == 3
hasWeights = table.label_dimension(options.weight) == 1 and options.laguerre hasWeights = table.label_dimension(options.weight) == 1 and options.laguerre
if np.any(info['grid'] < 1): errors.append('invalid grid a b c.') if np.any(np.array(info['grid']) < 1): errors.append('invalid grid a b c.')
if np.any(info['size'] <= 0.0) \ if np.any(np.array(info['size']) <= 0.0) \
and np.all(info['grid'] < 1): errors.append('invalid size x y z.') and np.all(np.array(info['grid']) < 1): errors.append('invalid size x y z.')
else: else:
for i in range(3): for i in range(3):
if info['size'][i] <= 0.0: # any invalid size? if info['size'][i] <= 0.0: # any invalid size?