@@ -548,7 +548,7 @@ def __call__(self, material):
548548 values , config , original = as_material_array (
549549 material , self ._basis , self ._phases , self .chemicals
550550 )
551- if values .ndim == 2 and not isinstance (self ._reactant_index , tuple ) :
551+ if values .ndim == 2 and len (self ._phases ) == 1 :
552552 for i , j in zip (values , material ): self ._reaction (i , j )
553553 else :
554554 self ._reaction (values , material )
@@ -1772,9 +1772,10 @@ class ReactionSystem:
17721772 __slots__ = ('_reactions' ,
17731773 '_basis' ,
17741774 '_chemicals' ,
1775- '_phases' )
1775+ '_phases' ,
1776+ '_reactant_index' )
1777+
17761778
1777- _reactant_index = ()
17781779
17791780 def __init__ (self , * reactions , basis = None ):
17801781 if not reactions : raise ValueError ('Reactions cannot be empty' )
@@ -1785,7 +1786,7 @@ def __init__(self, *reactions, basis=None):
17851786 except : raise ValueError ('all reactions must have the same chemicals' )
17861787 self ._chemicals = chemicals
17871788 try : self ._basis , = set ([i ._basis for i in reactions ])
1788- except : raise ValueError ('all reactions must have the same basis' )
1789+ except : raise ValueError ('all reactions must have the same basis' )
17891790
17901791 force_reaction = Reaction .force_reaction
17911792 adiabatic_reaction = Reaction .adiabatic_reaction
0 commit comments