bayesflow-org/bayesflow

[FEATURE] `Adapter.reshape()`

Open

#508 opened on Jun 11, 2025

View on GitHub
 (0 comments) (3 reactions) (1 assignee)Python (85 forks)auto 404
featuregood first issueuser interface

Repository metrics

Stars
 (694 stars)
PR merge metrics
 (PR metrics pending)

Description

Feature Description Very frequently, users have to change the shape of their simulation outputs as part of the configuration for generating the right data for training the approximator. Therefore, reshape() would be a great feature to have for the Adapter.

A (very rough) example usage is provided as below:

sim = {"x": np.arange(6)}

adapter = (
    bf.adapters.Adapter()
    # ...
    .reshape("x", to_shape=(3, 2))
    # ...
)

Contributor guide