def test_generate_samples_shape(self, ndim):
        """Checks that the output shape of generated samples from quantiles and quantile predictions
        is as expected."""
        n_time_steps = 10
        n_columns = 5
        n_quantiles = 20
        num_samples = 50

        q = np.linspace(0, 1, n_quantiles)
        q_pred = np.random.rand(n_time_steps, n_columns, n_quantiles)
        if ndim == 2:
            q_pred = q_pred.reshape((n_time_steps, n_columns * n_quantiles))
        y_pred = sample_from_quantiles(q_pred, q, num_samples)
        assert y_pred.shape == (n_time_steps, n_columns, num_samples)
Checks that the output shape of generated samples from quantiles and quantile predictions
        is as expected.
darts/tests/utils/test_utils.py