pep8 format all

This commit is contained in:
Eren G
2018-08-02 16:34:17 +02:00
parent 3238ffa3e6
commit f5537dc48f
32 changed files with 766 additions and 599 deletions
+5 -5
View File
@@ -6,8 +6,8 @@ import matplotlib.pyplot as plt
def plot_alignment(alignment, info=None):
fig, ax = plt.subplots(figsize=(16, 10))
im = ax.imshow(alignment.T, aspect='auto', origin='lower',
interpolation='none')
im = ax.imshow(
alignment.T, aspect='auto', origin='lower', interpolation='none')
fig.colorbar(im, ax=ax)
xlabel = 'Decoder timestep'
if info is not None:
@@ -17,7 +17,7 @@ def plot_alignment(alignment, info=None):
plt.tight_layout()
fig.canvas.draw()
data = np.fromstring(fig.canvas.tostring_rgb(), dtype=np.uint8, sep='')
data = data.reshape(fig.canvas.get_width_height()[::-1] + (3,))
data = data.reshape(fig.canvas.get_width_height()[::-1] + (3, ))
plt.close()
return data
@@ -30,6 +30,6 @@ def plot_spectrogram(linear_output, audio):
plt.tight_layout()
fig.canvas.draw()
data = np.fromstring(fig.canvas.tostring_rgb(), dtype=np.uint8, sep='')
data = data.reshape(fig.canvas.get_width_height()[::-1] + (3,))
data = data.reshape(fig.canvas.get_width_height()[::-1] + (3, ))
plt.close()
return data
return data