nigsp.operations.nifti.mat_to_vol¶
- nigsp.operations.nifti.mat_to_vol(data, shape=None, asdata=None)[source]¶
Reshape nD data (normally 2D) using either shape or data shape).
- Parameters:
- data
numpy.ndarray Data to be reshaped.
- shape
Noneorlistofint, optional New shape.
- asdata
Noneornumpy.ndarray, optional Numpy ndarray to use the shape of.
- data
- Returns:
numpy.ndarrayReshaped data.
- Raises:
ValueErrorIf both shape and asdata are empty.