Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bayesflow/adapters/transforms/broadcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
data[k] = np.expand_dims(data[k], axis=tuple(np.arange(0, len_diff)))
elif self.expand == "right":
data[k] = np.expand_dims(data[k], axis=tuple(-np.arange(1, len_diff + 1)))
elif isinstance(self.expand, tuple):
elif isinstance(self.expand, Sequence):

Check warning on line 120 in bayesflow/adapters/transforms/broadcast.py

View check run for this annotation

Codecov / codecov/patch

bayesflow/adapters/transforms/broadcast.py#L120

Added line #L120 was not covered by tests
if len(self.expand) is not len_diff:
raise ValueError("Length of `expand` must match the length difference of the involed arrays.")
data[k] = np.expand_dims(data[k], axis=self.expand)
Expand Down