Skip to content

Commit

Permalink
Handle case where light curve is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
golmschenk committed Aug 2, 2024
1 parent d64fb83 commit 6f1584e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/qusi/internal/light_curve_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def make_uniform_length(example: np.ndarray, length: int) -> np.ndarray:
)
if example.shape[0] == length:
pass
if example.shape[0] == 0:
example = np.array([-1], dtype=example.dtype)
elif example.shape[0] > length:
example = example[:length]
else:
Expand Down

0 comments on commit 6f1584e

Please sign in to comment.