spectrochempy.squeeze๏
- squeeze(*dims, inplace=False)[source]๏
Remove single-dimensional entries from the shape of a NDDataset.
- Parameters:
*dims (None or int or tuple of ints, optional) โ Selects a subset of the single-dimensional entries in the shape. If a dimension (dim) is selected with shape entry greater than one, an error is raised.
inplace (bool, optional, default=`False`) โ Flag to say that the method return a new object (default) or not (inplace=True).
- Returns:
NDDatasetโ The input array, but with all or a subset of the dimensions of length 1 removed.- Raises:
ValueError โ If
dimis notNone, and the dimension being squeezed is not of length 1.