Skip to content
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

Not all StridedArrays follow the strided array API #54563

Open
LilithHafner opened this issue May 23, 2024 · 0 comments
Open

Not all StridedArrays follow the strided array API #54563

LilithHafner opened this issue May 23, 2024 · 0 comments
Labels
arrays [a, r, r, a, y, s]

Comments

@LilithHafner
Copy link
Member

The docs about DenseArray merely require that elements are stored contiguously in memory, so one could define a DenseArray subtype that meets that definition and does not define strides or pointer. In that case, the type would be a StridedArray because DenseArray <: StridedArray, but would not actually follow the StridedArray API.

I do not think it is reasonable for users to be expected to read the StridedArray docs when defining a DenseArray because StridedArray is simply a union that happens to contain DenseArray.

https://docs.julialang.org/en/v1/base/arrays/#Core.DenseArray

https://docs.julialang.org/en/v1/base/arrays/#Base.StridedArray

https://docs.julialang.org/en/v1/manual/interfaces/#man-interface-strided-arrays

Originally posted by @LilithHafner in #54558 (comment)

@dkarrasch dkarrasch added the arrays [a, r, r, a, y, s] label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrays [a, r, r, a, y, s]
Projects
None yet
Development

No branches or pull requests

2 participants