Sampling fails for columns of dtype `Array(List(...), ...)`
Open
@borchero is already working on this.
Since Feb 17, 2026.
bug
- Dominant language
- Python
- Stars
- 618
- Forks
- 21
- Avg merge
- 14h 34m
- Merged PRs (30d)
- 7
Description
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 withpolars.exceptions.InvalidOperationError: cannot reshape array of size 49 into shape (1, 2) - and calling
test_sample_array_list(1, 1)
fails withpolars.exceptions.SchemaError: type Boolean is incompatible with expected type List(Boolean)
I'd expect both to pass.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.