felixpatzelt / colorednoise

Python package to generate Gaussian (1/f)**beta noise (e.g. pink noise)
MIT License
195 stars 20 forks source link

type-hint for `fmin` in `colorednoise.powerlaw_psd_gaussian` #17

Closed charlesbmi closed 1 year ago

charlesbmi commented 1 year ago

pyright was throwing an error for me in my calling code, because it thought powerlaw_psd_gaussian expected fmin to be an int (based on the fmin=0 function signature). This updates fmin to explicitly be a float value, as noted in the docs.

felixpatzelt commented 1 year ago

@charlesincharge thank you for the PR. I opened a followup one to complete the type annotations to all parameters. If you have time, please check if this works for you. I will then publish the new version to PyPI.

charlesbmi commented 1 year ago

Works well for me, thanks @felixpatzelt !