Closed telephon closed 3 years ago
in 01_spect_resynth/02_spect.ipynb
01_spect_resynth/02_spect.ipynb
instead of plt.scatter(x=data_tsne, y=np.zeros(data_tsne.shape), c=list(range(len(data_tsne))))
plt.scatter(x=data_tsne, y=np.zeros(data_tsne.shape), c=list(range(len(data_tsne))))
can be simplified to plt.scatter(x=data_tsne, y=np.zeros(len(data_tsne)), c=range(len(data_tsne)))
plt.scatter(x=data_tsne, y=np.zeros(len(data_tsne)), c=range(len(data_tsne)))
(and in all the other examples)
did not know that plt also accepts an iterator in this case.
Maybe an even better way would be
plt.scatter(x=data_tsne, y=np.zeros(len(data_tsne)), c=np.arange(len(data_tsne)))
as arange creates a proper array instead of an iterator
in
01_spect_resynth/02_spect.ipynb
instead of
plt.scatter(x=data_tsne, y=np.zeros(data_tsne.shape), c=list(range(len(data_tsne))))
can be simplified to
plt.scatter(x=data_tsne, y=np.zeros(len(data_tsne)), c=range(len(data_tsne)))
(and in all the other examples)