There is a bug in IgtMix.__setitem__() that causes incorrect behavior when increasing the dimension of a mixture array dynamically.
>>> import pyromat.igtools as igt
>>> import pyromat as pm
>>> pm.config['unit_matter'] = 'kmol'
>>> mix = igt.IgtMix('3N2 + 2O2')
>>> mix['N2'] = [[3,2],[1,0]]
>>> print(mix)
N2 : array([[3., 2.],
[1., 0.]])
O2 : array([[3., 3.],
[2., 2.]])
The original O2 quantity was 2 kmol, and it should have been broadcast to be 2 kmol at all mixture array elements. The behavior seems to be unique to higher dimension arrays.
There is a bug in
IgtMix.__setitem__()that causes incorrect behavior when increasing the dimension of a mixture array dynamically.The original O2 quantity was 2 kmol, and it should have been broadcast to be 2 kmol at all mixture array elements. The behavior seems to be unique to higher dimension arrays.