-
Notifications
You must be signed in to change notification settings - Fork 29
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
Potential issue with findblock[index]
for BlockUnitRange
with first != 1
#336
Comments
I think the current behaviour is correct... |
Yeah I think you are right, I just found it surprising. I think ultimately what I wanted was a function that implemented It seems like for it to be well defined beyond sorted collections with unique elements (like unit ranges), it should be called |
Call it findaxesblock? For matrices would also support findaxesblock(A, k, j) returning a Block{2} |
|
Perhaps I am misunderstanding how
findblock[index]
is supposed to work, but this behavior is confusing to me:I expected it to return:
i.e. in a call to
findblock(r, k)
, I was interpretingk
as an index, and thoughtfindblock
would output the block that index is in, but it seems to be interpretingk
as a value, and is outputting the block that value is in.Maybe the giveaway is that
find*
functions inBase
find the index of a value, so the current behavior offindblock
is consistent with that convention, and really I was just hoping for a different function with a different functionality.The text was updated successfully, but these errors were encountered: