You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to make it simpler/cleaner to specify OffsetArrays backed by standard arrays. And also use analogous syntax to standard Arrays for creating and typing OffsetArrays.
An example might be best:
type MyType
x::OffsetStdVector{Int}
y::OffsetStdArray{Float64,2}
end
a = OffsetVector{Int}(0:5)
b = OffsetArray{Float64}(0:12, -1:1)
c = MyType(a, b)
a = zeros(Int, 0:5) # [3]
b = zeros(Float64, 0:12, -1:1) #[3]
c = MyType(a, b)
This can be achieved currently with something like:
The fundamental problem is to distinguish a range that specifies indices from an AbstractArray that you'd like to wrap. Is OffsetArray(a, b) wrapping a, or does a describe the indices?
Well, firstly thanks for providing OffsetArrays.
I want to make it simpler/cleaner to specify
OffsetArrays
backed by standard arrays. And also use analogous syntax to standardArrays
for creating and typingOffsetArrays
.An example might be best:
This can be achieved currently with something like:
Ideally
OffsetArray
could be renamed to sayOffsetGenArray
, so that standard array-backed type could be justOffsetArray
In any case,
OffsetVector
be exported?OffsetArray{T}(inds)
can construct (similar to recommended way to construct standard arrays)?zero
deprecated? using syntax as above seems quite natural to me.The text was updated successfully, but these errors were encountered: