Skip to content

Commit

Permalink
add check if no new pauses to concatenate (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeEfstathiadis authored Dec 15, 2023
1 parent 1e54660 commit 07b2702
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion forest/jasmine/data2mobmat.py
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,8 @@ def infer_mobmat(mobmat: np.ndarray, interval: float, r: float) -> np.ndarray:
(mobmat, np.ones(n_rows).reshape(n_rows, 1))
)
# Append new pauses to the trajectory matrix
mobmat = np.vstack((mobmat, new_pauses_array))
if new_pauses_array.shape[0] > 0:
mobmat = np.vstack((mobmat, new_pauses_array))
# Sort the matrix by start time
mobmat = mobmat[mobmat[:, 3].argsort()].astype(float)

Expand Down

0 comments on commit 07b2702

Please sign in to comment.