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 not- None, and the dimension being squeezed is not of length 1.