GO-Eratosthenes / dhdt

Extracting topography from mountain glaciers, through the use of shadow casted by surrounding mountains.
https://dhdt.readthedocs.io
Apache License 2.0
7 stars 1 forks source link

bare `except` in `affine_optical_flow` #102

Closed fnattino closed 1 year ago

fnattino commented 1 year ago

Also in affine_optical_flow in dhdt/processing/matching_tools_differential.py, there is a bare except statement (to be avoided according to PEP8). It seems here that you use it to verify whether the number of values and points are identical - can one do it with an assert statement involving the size of I2_new and stk_ij?

https://github.com/GO-Eratosthenes/dhdt/blob/bec72db5a94c254b7aff4a3f45f357867f53cabb/dhdt/processing/matching_tools_differential.py#L362C16-L362C16