tuwien-musicir / rp_extract

Rhythm Pattern music feature extractor by IFS @ TU-Vienna
GNU General Public License v3.0
110 stars 27 forks source link

VisibleDeprecationWarning since numpy 1.11, Boolean Error since numpy 1.13 #25

Open audiofeature opened 6 years ago

audiofeature commented 6 years ago

in transform2bark() in rp_extract.py there is this warning since numpy 1.11:

    # VisibleDeprecationWarning: boolean index did not match indexed array along dimension 0; dimension is 1024 but corresponding boolean dimension is 513
    matrix_out[b] = np.sum(matrix[((freq_axis >= barks[b]) & (freq_axis < barks[b+1]))], axis=0)

Since numpy 1.13 it became an error.

This is because the matrix on the right hand side does not match the matrix to be assigned. (so far it has been assigned implicitly)

It should be thouroughly checked what is assigned before this code can be fixed.