arundo / tsaug

A Python package for time series augmentation
https://tsaug.readthedocs.io
Apache License 2.0
347 stars 37 forks source link

Default _Augmentor arguments will raise an error #4

Closed roycoding closed 4 years ago

roycoding commented 4 years ago

While working on #1 I found that the default args for initializing an _Augmentor object could lead to the code trying to call None when expecting a function.

See: https://github.com/arundo/tsaug/blob/ebf1955664991fe51f038a5cc8506f1bfc849d91/src/tsaug/augmentor.py#L5 https://github.com/arundo/tsaug/blob/ebf1955664991fe51f038a5cc8506f1bfc849d91/src/tsaug/augmentor.py#L6

and

https://github.com/arundo/tsaug/blob/ebf1955664991fe51f038a5cc8506f1bfc849d91/src/tsaug/augmentor.py#L47

I know that it's not intended to be initialized without an augmenter function, function, but I was wondering if you want to explicitly prevent an error here.

Or is something else supposed to be happening?

tailaiw commented 4 years ago

Thank for catching the problem. Will fix.