Add nifti support by @CloseChoice in https://github.com/huggingface/datasets/pull/7815
ds = load_dataset("username/my_nifti_dataset")
ds["train"][0] # {"nifti": <nibabel.nifti1.Nifti1Image>}
files = ["/path/to/scan_001.nii.gz", "/path/to/scan_002.nii.gz"]
ds = Dataset.from_dict({"nifti": files}).cast_column("nifti", Nifti())
ds["train"][0] # {"nifti": <nibabel.nifti1.Nifti1Image>}
Add num channels to audio by @CloseChoice in https://github.com/huggingface/datasets/pull/7840
# samples have shape (num_channels, num_samples)
ds = ds.cast_column("audio", Audio()) # default, use all channels
ds = ds.cast_column("audio", Audio(num_channels=2)) # use stereo
ds = ds.cast_column("audio", Audio(num_channels=1)) # use mono
_batch_setitems() by @sghng in https://github.com/huggingface/datasets/pull/7817Full Changelog: https://github.com/huggingface/datasets/compare/4.3.0...4.4.0
Fetched April 7, 2026