Consider:
def test_sample_array_list(arr_size, n_samples):
class TestSchema(dy.Schema):
a = dy.Array(dy.List(dy.Bool()), arr_size)
TestSchema.sample(n_samples, generator=dy.random.Generator(0))
On dataframely==2.3.1:
- calling
test_sample_array_list(2, 1)
fails with polars.exceptions.InvalidOperationError: cannot reshape array of size 49 into shape (1, 2)
- and calling
test_sample_array_list(1, 1)
fails with polars.exceptions.SchemaError: type Boolean is incompatible with expected type List(Boolean)
I'd expect both to pass.