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
None
orlist
ofint
, optional New shape.
- asdata
None
ornumpy.ndarray
, optional Numpy ndarray to use the shape of.
- data
- Returns:
numpy.ndarray
Reshaped data.
- Raises:
ValueError
If both shape and asdata are empty.