Skip to content

Commit

Permalink
add __call__ method to with_units
Browse files Browse the repository at this point in the history
  • Loading branch information
mefuller committed Dec 11, 2023
1 parent 8563be1 commit 605844a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions site_scons/site_tools/UnitsInterfaceBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ def __setattr__(self, name, value):
else:
setattr(self._phase, name, value)
def __call__(self, *species):
out = SolutionArray(self._phase[species], init=False)
self._share(out, range(self.size))
out.shape = self.shape
return out
@property
def basis_units(self):
\"\"\"The units associated with the mass/molar basis of this phase.\"\"\"
Expand Down

0 comments on commit 605844a

Please sign in to comment.