fourMs / MGT-python

Musical Gestures Toolbox for Python
https://www.uio.no/ritmo/english/research/labs/fourms/downloads/software/musicalgesturestoolbox/mgt-python/index.html
GNU General Public License v3.0
52 stars 11 forks source link

Problem with weights in history #319

Open alexarje opened 4 months ago

alexarje commented 4 months ago

I am testing the weights feature of history. In the documentation it says that it can be given by "3 1.2 1". However, when I try this:

video.history(history_length=100, weights="3 1.2 1")

I get the following error:

ParameterError: Found wrong type(s) in the list of weights. Use ints and floats.

I have tested with only ints and only floats, but I get the the same error. Is this a bug?

joachimpoutaraud commented 4 months ago

Thanks for reporting this issue! There seems to be a problem with the string formatting in the function documentation (which is a bit unconventional, by the way), I'll try to fix that as soon as possible. In the meantime, you can replace your string with a correct int/float list and that should solve your problem (e.g. weights=[3,1.2,1]).