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
Define Replicate(), Symmetric() and other border options like Inner() instead of using strings #21
Comments
I have just submitted a journal paper regarding my |
Yes, those are correct.
Because with |
Hi Tim, You probably have thought about this interface very carefully, but from the user side this is very tricky. Returning an OffsetArray puts responsibility on the user that now has to check if he has an Array or OffsetArray. For instance, I cannot assume anymore I will always get an Array, because sometimes I use Now, related to this issue specifically, can't we make every border scheme a type to be consistent? |
Cross-reference JuliaArrays/OffsetArrays.jl#18 (comment). See docs on the "generic array interface" at http://docs.julialang.org/en/latest/devdocs/offset-arrays.html#Arrays-with-custom-indices-1. |
Thank you Tim, what about replacing the strings "symmetric", "replicate" by types like Inner()? Would that solve type instability too? It would definitely make the interface consistent. |
There's already We could make |
Hi Tim, ideally these would be their own types in case someone wants to specialize some super optimal implementation in the future, but having |
I am finally putting together all the pieces of this great work. Thanks Tim for your patience. Everything is consistent as we can simply do |
Can you please confirm the new syntax for the following two operations:
Am I correct to say that the new version is:
Why
Inner()
is treated with a separate type unlike other options that are triggered with strings?The text was updated successfully, but these errors were encountered: