getkeops / keops

KErnel OPerationS, on CPUs and GPUs, with autodiff and without memory overflows
https://www.kernel-operations.io
MIT License
1.05k stars 64 forks source link

A small BUG in type analysis #167

Closed wzm2256 closed 3 years ago

wzm2256 commented 3 years ago

The else block in line 118 in https://github.com/getkeops/keops/blob/master/pykeops/common/get_options.py is not indented correctly. There should be one more indent.

The current version will report an error "local variable 'MemType' referenced before assignment" when the input type is not expected, because the else block therein is not run when the if condition in line 99 is not satisfied.

It is just a small bug and I think it is not necessary to make a pull request.

joanglaunes commented 3 years ago

Hello @wzm2256 , Ok thank you for this report. In fact I think we need to repeat the else statement twice, one for the inner if and one for the outer.

wzm2256 commented 3 years ago

Sure, it's up to you guys to decide. Thanks for providing this wonderful tool.

Please feel free to close this issue.