Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use keyword method instead of mode #953

Open
jgostick opened this issue Apr 2, 2024 · 3 comments
Open

Use keyword method instead of mode #953

jgostick opened this issue Apr 2, 2024 · 3 comments
Labels
api PR tag for breaking changes

Comments

@jgostick
Copy link
Member

jgostick commented Apr 2, 2024

I have noticed that some numpy/scipy functions have (started) using this. I think I like it and it's slightly more descriptive. Is it worth making the change?

@jgostick
Copy link
Member Author

'mode' would be used when a different result is returned, while 'method' would be a different way to compute the same result. Example would be method='tessellation' vs method='distance_matrix'.

@jgostick jgostick added the api PR tag for breaking changes label Jun 24, 2024
@jgostick
Copy link
Member Author

jgostick commented Jul 8, 2024

We should do a "find all" for the mode' in the function definitions, then create a list of all functions where this change might make sense here. Most function will probably remain with mode.

@jgostick
Copy link
Member Author

jgostick commented Jul 8, 2024

For example, find_trapped_regions currently uses cluster labeling, which works fine/fast for pressure based drainage but for invasion percolation it is too slow, so we have created find_trapped_regions2. This should be accessible via find_trapped_regions by switching the method.

@jgostick jgostick changed the title Use keyword method instead of mode? Use keyword method instead of mode Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api PR tag for breaking changes
Projects
None yet
Development

No branches or pull requests

1 participant