reverted back to hard-to-read but working if else statement
This commit is contained in:
parent
d99f13a49f
commit
056ba0f2e4
|
@ -124,7 +124,8 @@ for file in files:
|
|||
i += s
|
||||
|
||||
#--- do work ------------------------------------------------------------------------------------
|
||||
newInfo['grid'] = np.array(int(o*float(n.translate(None,'xX'))) if [n[-1].lower() == 'x' else int(n.translate(None,'xX'))}[n[-1].lower() == 'x'] for o,n in zip(info['grid'],options.grid)],'i')
|
||||
newInfo['grid'] = np.array([{True: int(o*float(n.translate(None,'xX'))),
|
||||
False: int(n.translate(None,'xX'))}[n[-1].lower() == 'x'] for o,n in zip(info['grid'],options.grid)],'i')
|
||||
newInfo['grid'] = np.where(newInfo['grid'] <= 0 , info['grid'],newInfo['grid'])
|
||||
|
||||
microstructure = microstructure.reshape(info['grid'],order='F')
|
||||
|
|
Loading…
Reference in New Issue