Skip to content

Commit

Permalink
Add check
Browse files Browse the repository at this point in the history
Signed-off-by: nstarman <[email protected]>
  • Loading branch information
nstarman committed Aug 4, 2023
1 parent 157aa5a commit 879ec50
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/stream_ml/pytorch/builtin/_isochrone/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ def __post_init__(self, *args: Any, **kwargs: Any) -> None:
if not self.phot_names:
msg = "Must provide `phot_names`."
raise ValueError(msg)
elif not isinstance(self.phot_names, tuple):
msg = "`phot_names` must be a tuple." # type: ignore[unreachable]
raise ValueError(msg)

# And phot_apply_dm
if len(self.phot_apply_dm) != len(self.phot_names):
Expand Down Expand Up @@ -266,7 +269,7 @@ def ln_likelihood(
# available.
where_: Array # (N, F)
if where is not None:
where_ = where[tuple(self.phot_names)].array
where_ = where[self.phot_names].array
elif self.require_where:
raise WhereRequiredError
else:
Expand Down

0 comments on commit 879ec50

Please sign in to comment.