-
Notifications
You must be signed in to change notification settings - Fork 120
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
covers_positions
routine with diverging return types
#1305
Comments
That seems to be a mistake. The latter two are probably the correct ones, but I am a bit surprised they don't return arrays of booleans. |
I am not sure if there is a real reason for this diverging practice. I will have a look. |
I don't think the one in |
The methods actually belong to two different classes: But anyway, I agree with Gaute that it sounds more logical for all of these methods to return an array of booleans. If you agree, I could make this change consistently. |
Yes, that sounds good. For ReaderBlock it should have a different name: covers_all_positions, while for the readers it should return indices? |
Thanks! Does this have any bearing on my latest comment #1279 about the possible return of a zero size array? |
opendrift/opendrift/readers/operators/readerops.py
Line 46 in 857fb75
returns an array
whereas these, and all the other ones I can find, return a boolean:
opendrift/opendrift/readers/basereader/unstructured.py
Line 134 in 857fb75
opendrift/opendrift/readers/interpolation/structured.py
Line 143 in 857fb75
what is the reasoning behind that?
The text was updated successfully, but these errors were encountered: