spectrochempy.empty_like
- empty_like(dataset, dtype=None, **kwargs)[source]
- Return a new uninitialized - NDDataset.- The returned - NDDatasethave the same shape and type as a given array. Units, coordset, … can be added in kwargs.- Parameters:
- dataset ( - NDDatasetor array-like) – Object from which to copy the array structure.
- dtype (data-type, optional) – Overrides the data type of the result. 
- **kwargs – Optional keyword parameters (see Other Parameters). 
 
- Returns:
- emptylike – Array of - fill_valuewith the same shape and type as- dataset.
- Other Parameters:
- units (str or ur instance) – Units of the returned object. If not provided, try to copy from the input object. 
- coordset (list or Coordset object) – Coordinates for the returned object. If not provided, try to copy from the input object. 
 
 - Notes - This function does not initialize the returned array; to do that use for instance - zeros_like,- ones_likeor- full_likeinstead. It may be marginally faster than the functions that do set the array values.