Skip to content

Commit

Permalink
fix non-unit dim set
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsKue committed Oct 18, 2024
1 parent f4af042 commit 7e84cb4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bayesflow/data_adapters/transforms/as_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ def forward(self, data: np.ndarray, **kwargs) -> np.ndarray:
return np.atleast_3d(data)

def inverse(self, data: np.ndarray, **kwargs) -> np.ndarray:
return np.squeeze(data, axis=2)
if data.shape[2] == 1:
return np.squeeze(data, axis=2)

return data

0 comments on commit 7e84cb4

Please sign in to comment.