(spec, vmin=None, vmax=None)
| 6 | |
| 7 | |
| 8 | def spec_to_figure(spec, vmin=None, vmax=None): |
| 9 | if isinstance(spec, torch.Tensor): |
| 10 | spec = spec.cpu().numpy() |
| 11 | fig = plt.figure(figsize=(12, 6)) |
| 12 | plt.pcolor(spec.T, vmin=vmin, vmax=vmax) |
| 13 | return fig |
| 14 | |
| 15 | |
| 16 | def spec_f0_to_figure(spec, f0s, figsize=None): |
no outgoing calls
no test coverage detected