llSourcell / Music_Generator_Demo

Music Generator Demo by @Sirajology on Youtube
246 stars 123 forks source link

TypeError: slice indices must be integers or None or have an __index__ method #5

Closed alexohneander closed 7 years ago

alexohneander commented 7 years ago
Traceback (most recent call last):
  File "rbm_chords.py", line 116, in <module>
    song = song[:np.floor(song.shape[0]/num_timesteps)*num_timesteps]
TypeError: slice indices must be integers or None or have an __index__ method
alexohneander commented 7 years ago

song = song[:int(np.floor(song.shape[0]/num_timesteps)*num_timesteps)] solved it.

pruthvishetty commented 7 years ago

Or downgrade numpy.