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

Complete mandatory methods for Array interface for IndexedVarArray #23

Closed
2 of 15 tasks
hellemo opened this issue Sep 22, 2022 · 1 comment
Closed
2 of 15 tasks

Comments

@hellemo
Copy link
Member

hellemo commented Sep 22, 2022

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

Mandatory

  • size(A)
  • getindex(A, I::Vararg{Int, N})
  • setindex!(A, v, i::Int)
  • setindex!(A, v, I::Vararg{Int, N})

Optional

  • IndexStyle(::Type)
  • getindex(A, I...)
  • setindex!(A, X, I...)
  • iterate
  • length(A)
  • similar(A)
  • similar(A, ::Type{S})
  • similar(A, dims::Dims)
  • similar(A, ::Type{S}, dims::Dims)

Non-traditional indices

  • similar(A, ::Type{S}, inds)
  • similar(T::Union{Type,Function}, inds)
@hellemo
Copy link
Member Author

hellemo commented Oct 1, 2022

Now convinced this is not a good idea. Closing.

@hellemo hellemo closed this as completed Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant