mindspore.dataset.audio.transforms.Angle
- class mindspore.dataset.audio.transforms.Angle[source]
Calculate the angle of complex number sequence.
Note
The dimension of the audio waveform to be processed needs to be (…, complex=2). The first dimension represents the real part while the second represents the imaginary.
- Raises
RuntimeError – If input tensor is not in shape of <…, complex=2>.
- Supported Platforms:
CPU
Examples
>>> import numpy as np >>> >>> waveform = np.array([[1.43, 5.434], [23.54, 89.38]]) >>> numpy_slices_dataset = ds.NumpySlicesDataset(data=waveform, column_names=["audio"]) >>> transforms = [audio.Angle()] >>> numpy_slices_dataset = numpy_slices_dataset.map(operations=transforms, input_columns=["audio"])