-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Buffer: fix discrepancy in slicing order #1090
Comments
I can look into this. Currently this is the signature of So the idea here is to not support full-buffer (filled and non-filled entries) retrieval, when slice is provided, for What about the cases when user gives a |
I'm not sure when we should ever be retrieving the full buffer. Tbh I haven't given too much thought about the best way of resolving this, it just seems very confusing and arbitrary that |
I have reviewed this issue again. The different way of retrieving with slicing seems arbitrary to me. The user can check the maximum size via the We should probably update Here are some examples of how indexing is currently different between the two:
|
Glad you agree with me on this ^^. I'm not sure whether anywhere in the code the retrieval of the slice with empty values is used. For me it's fine to completely remove it, however, many tests will need to be adjusted, as now many of them rely on this somehow weird retrieval mechanism. We could live without the full retrieval method until someone actually needs it. It's a good practice to keep the public interface as small as possible |
Closed the issue accidentally, sry for that |
Sorry, I'm afraid I don't understand what you are asking. We can have a call on Friday if you want to :) |
It doesn't make sense for
buffer[:].obs
to be so wildly different frombuffer.obs[:]
. One is retrieving the full buffer, filled up with zeros, the other just the filled entries.We should probably never retrieve the full buffer through slicing. There could be a new method like
get_full_entry_sequence
that is documented to retrieve the non-filled entries as well if it's actually needed.While addressing this issue, buffer and collector related tests should be adjusted and improved.
The text was updated successfully, but these errors were encountered: