NeuralAnalysis / PyalData

Repository for the Python implementation of the TrialData analysis library.
GNU General Public License v3.0
7 stars 9 forks source link

positional argument in restrict_to_interval #84

Closed AtMostafa closed 3 years ago

AtMostafa commented 3 years ago

the error below happens only if the first argument (trial_data) is specified as a keyword. I think there is an assumption that the first argument will always be positional :) image

bagibence commented 3 years ago

Yes, that's exactly it. Do you have a preference for passing it as a keyword argument?

AtMostafa commented 3 years ago

Just being explicit. I copied the function signature from where it was defined (which is what I always do to avoid mistakes) and that's how this error happened.

bagibence commented 3 years ago

Okay. We can fix it, we just have to put another check in the decorator. Do you want to fix this as your first PR? Or I can do it when I get around to it :)

bagibence commented 3 years ago

@AtMostafa can you check if this works for you?