-
Notifications
You must be signed in to change notification settings - Fork 25
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
Wrap AbstractArray rather than Array in SampleBuf? #60
Comments
Fixing this might allow nice adding constructs like |
I've implemented this for testing, and seems to work well: If you don't see any problems with this change, and are open to it, I can raise a PR. |
Yeah, I don't have any problem with that at all, seems like a good improvement. For your |
Correct |
Great, that's quite nice. Thanks! |
Also note that changing this |
I've included the |
I think I did something similar with the large PR I wrote a while back, might be worth checking in there to see if there's anything else you want to use. |
Actually turned out to be simple enough. I've added it to the same PR but in a different commit (in case you want to release them in separate version). I've added a test case to cover it too. |
I realize that wrapping an |
Yeah, rather than actually wrapping AbstractArray the wrapped type should be given as a type parameter. Otherwise indexing etc. will be very slow. |
Yup. But since this is encoded in |
Could we consider wrapping |
Currently
SampleBuf
wraps anArray
. This disallows wrapping of views or other array-like data types, for example. Is there any strong reason why not wrap anAbstractArray
instead?The text was updated successfully, but these errors were encountered: