fields.buffers.core.HDF5Buffer.expand_dims#
- HDF5Buffer.expand_dims(axis: int, *args, inplace: bool = False, **kwargs) BufferBase [source]#
Expand the shape of this buffer by inserting a new axis.
- Parameters:
axis (
int
) – Position at which to insert the new axis.*args – Additional positional arguments forwarded to
from_array()
.inplace (
bool
, optional) – If True, values for file, name, and overwrite are ignored; the dataset underlying the calling buffer is directly replaced and the object is updated and returned in-place.**kwargs – Additional keyword arguments forwarded to and
from_array()
. If inplace isTrue
, then these are forwarded toreplace_dataset()
.
- Returns:
A buffer with the expanded shape.
- Return type:
BufferBase