Skip to content

Commit

Permalink
ensure expected data dict ordering in TsGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
eschombu committed Jun 26, 2024
1 parent b2a32d2 commit f1dab4d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pynapple/core/ts_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def __init__(

data = {keys[j]: data[k] for j, k in enumerate(data.keys())}
self.index = np.sort(keys)
data = {k: data[k] for k in self.index} # Make sure data dict and index are ordered the same

self._metadata = pd.DataFrame(index=self.index, columns=["rate"], dtype="float")

Expand Down

0 comments on commit f1dab4d

Please sign in to comment.