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:
datanumpy.ndarray

Data to be reshaped.

shapeNone or list of int, optional

New shape.

asdataNone or numpy.ndarray, optional

Numpy ndarray to use the shape of.

Returns:
numpy.ndarray

Reshaped data.

Raises:
ValueError

If both shape and asdata are empty.