mindspore.dataset.audio.transforms.Angle
- class mindspore.dataset.audio.transforms.Angle[source]
Calculate the angle of the complex number sequence of shape (…, 2). The first dimension represents the real part while the second represents the imaginary.
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"])