manodeep / Corrfunc

⚡️⚡️⚡️Blazing fast correlation functions on the CPU.
https://corrfunc.readthedocs.io
MIT License
164 stars 50 forks source link

Improve args and keyword parsing in extensions #79

Closed manodeep closed 7 years ago

manodeep commented 8 years ago

Currently the input parameter parsing is sub-optimal. All the arguments are also noted as keywords and the input parameters are only parsed once. However, if autocorr==1, then the X2/Y2/Z2 arrays are not required. This causes issue with passing None as the X2/Y2/Z2 arrays from the python wrappers. Correct solution would be to parse the arguments once with positional args only and then parse the arguments again based on the entire keywords list. This parsing might need to use a different keyword list based on the value of autocorr.

The changes will have to be made in python_bindings for both theory and mocks.

manodeep commented 7 years ago

This really is an issue when the user tries to use the extension directly, rather than going through the corresponding python wrapper within Corrfunc.

manodeep commented 7 years ago

Since the user should really be only accessing the python wrappers to the extensions, and not the extensions directly, I am closing this.