trichter / rf

Receiver function calculation in seismology
MIT License
106 stars 62 forks source link

IterMultipleComponents can apply 'in' to non-iterable #9

Closed amedlin closed 5 years ago

amedlin commented 5 years ago

https://github.com/trichter/rf/blob/ae1b020428579b69bb83ec40620ba5bab05d369d/rf/util.py#L156

For example if n is int and n == 3 and len(s) = 2, then the logic will continue through to len(s) in n, but n being int is not iterable, so this raises TypeError: TypeError: argument of type 'int' is not iterable

The logic on this line needs to check for iterability before applying in to n.

trichter commented 5 years ago

Thanks, very good point.