Skip to content

Commit

Permalink
rename append function
Browse files Browse the repository at this point in the history
  • Loading branch information
kbonney committed Nov 6, 2023
1 parent 4730568 commit a55e2e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wntr/sim/results.py
Original file line number Diff line number Diff line change
@@ -236,11 +236,11 @@ def _adjust_time(self, ts: int):
for key in self.node.keys():
self.node[key].index += ts

def append_results_from(self, other):
def append(self, other):
"""
Combine two results objects into a single, new result object.
If the times overlap, then the results from the `other` object will take precedence
over the values in the calling object. I.e., given ``A.append_results_from(B)``,
over the values in the calling object. I.e., given ``A.append(B)``,
where ``A`` and ``B``
are both `SimluationResults`, any results from ``A`` that relate to times equal to or
greater than the starting time of results in ``B`` will be dropped.
@@ -262,7 +262,7 @@ def append_results_from(self, other):
"""
if not isinstance(other, SimulationResults):
raise ValueError("operating on a results object requires both be SimulationResults")
raise ValueError("operating on a results object requires both to be SimulationResults")
start_time = other.node["head"].index.values[0]
keep = self.node["head"].index.values < start_time
for key in self.link.keys():

0 comments on commit a55e2e9

Please sign in to comment.