Skip to content

Commit

Permalink
refactor(model-input): use assign instead of [] for time column
Browse files Browse the repository at this point in the history
  • Loading branch information
emptymalei committed Aug 12, 2024
1 parent f70b6ac commit 4dd093c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions hamilflow/models/brownian_motion.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,6 @@ def __call__(self, t: TypeTime, seed: int = 42) -> pd.DataFrame:
n_steps = np.array(t).size
trajectory = self._trajectory(n_new_steps=n_steps - 1, seed=seed)

df = pd.DataFrame(trajectory, columns=self._axis_names)

df["t"] = t
df = pd.DataFrame(trajectory, columns=self._axis_names).assign(t=t)

return df

0 comments on commit 4dd093c

Please sign in to comment.