Skip to content

Commit b23ebf5

Browse files
committed
simple fix
1 parent 2a19d32 commit b23ebf5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bayesflow/adapters/transforms/broadcast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def forward(self, data: dict[str, np.ndarray], **kwargs) -> dict[str, np.ndarray
117117
data[k] = np.expand_dims(data[k], axis=tuple(np.arange(0, len_diff)))
118118
elif self.expand == "right":
119119
data[k] = np.expand_dims(data[k], axis=tuple(-np.arange(1, len_diff + 1)))
120-
elif isinstance(self.expand, tuple):
120+
elif isinstance(self.expand, tuple) or isinstance(self.expand, list):
121121
if len(self.expand) is not len_diff:
122122
raise ValueError("Length of `expand` must match the length difference of the involed arrays.")
123123
data[k] = np.expand_dims(data[k], axis=self.expand)

0 commit comments

Comments
 (0)