Why does shape not return the number of channels


I was pretty surprised when I realized that my bug was due to ds.shape not showing the number of channels in its shape

    with rio.open(f, 'r') as ds:
        ds_arr = ds.read()
        print(ds.profile) # {'driver': 'GTiff', 'dtype': 'float32', 'nodata': 0.0, 'width': 890, 'height': 3080, 'count': 3, 'crs': CRS.from_epsg(32629), 'transform': Affine(15.0, 0.0, 232060.0,
       0.0, -15.0, 1438430.0), 'tiled': False, 'interleave': 'pixel'}
        print(ds.shape) # (3080, 890)
        print(ds_arr.shape) # (3, 3080, 890)

I assume this is the expected behavior, but was just taken aback by this.

Join main@rasterio.groups.io to automatically receive all group messages.