5dbe28db8e394a53eb4bd50e9d5bdeb4aa66be63,cube/synthesis.py,,_render_spectrogram,#Any#Any#,56

Before Change



def _render_spectrogram(mgc, output_file):
    bitmap = np.zeros((mgc.shape[1], mgc.shape[0], 3), dtype=np.uint8)
    mgc_min = mgc.min()
    mgc_max = mgc.max()

    for x in range(mgc.shape[0]):
        for y in range(mgc.shape[1]):
            val = (mgc[x, y] - mgc_min) / (mgc_max - mgc_min)

After Change



    for x in range(mgc.shape[0]):
        for y in range(mgc.shape[1]):
            val = np.clip(mgc[x, y] * 255, 0, 255)  // (mgc[x, y] - mgc_min) / (mgc_max - mgc_min)

            color = val
            bitmap[mgc.shape[1] - y - 1, x] = [color, color, color]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: tiberiu44/TTS-Cube
Commit Name: 5dbe28db8e394a53eb4bd50e9d5bdeb4aa66be63
Time: 2019-02-09
Author: tibi@racai.ro
File Name: cube/synthesis.py
Class Name:
Method Name: _render_spectrogram


Project Name: tiberiu44/TTS-Cube
Commit Name: 5dbe28db8e394a53eb4bd50e9d5bdeb4aa66be63
Time: 2019-02-09
Author: tibi@racai.ro
File Name: cube/synthesis.py
Class Name:
Method Name: _render_spectrogram


Project Name: nipy/dipy
Commit Name: 990702bedcfd4bfd62b3c96f82a26fd8e1b6354a
Time: 2013-09-11
Author: Samuel.St-Jean@usherbrooke.ca
File Name: dipy/segment/mask.py
Class Name:
Method Name: segment_from_cfa


Project Name: nipy/dipy
Commit Name: a9fa0782dc1df24bd3e9c9ee9ddd3ab1dc9fd5e0
Time: 2013-09-11
Author: Samuel.St-Jean@usherbrooke.ca
File Name: dipy/segment/mask.py
Class Name:
Method Name: segment_from_cfa