```{index} single: setdims (PDL) ``` ```{index} single: PDL::setdims ``` # setdims Give an ndarray a new shape, in place. $pdl->setdims([3, 4]); The argument is an arrayref of dimension sizes; anything else means no dimensions. The ndarray is modified rather than a new one returned, and storage is allocated to match the new shape. This does not rearrange existing values into the new shape - use `reshape` for that.