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
Below is a copy of the issue I opened in the Clustering.jl repo. In the comments of that issue it was suggested that I open an issue here, so here it is.
I'm trying to run clustering on a view with indices of type UInt64, but getting the error in the title.
/Users/forcebru/test/uint64_view.jl:11 is the last line of the code above.
Now the important part is that this error doesn't appear when I use regular signed integers when indexing. Changing @view data[1:UInt64(50)] to @view data[1:50] "solves" this error. I find it very strange that the type of the index has an effect on the processing of the view. I understand that the view with the UInt64 index is of type SubArray{Float64, 1, Vector{Float64}, Tuple{UnitRange{UInt64}}, true}, which involves UInt64, while an "ordinary" view like @view data[1:50] is of type SubArray{Float64, 1, Vector{Float64}, Tuple{UnitRange{Int64}}, true}, now with Int64. So, the type of the index is reflected in the type of the view, which makes sense.
What I don't understand is why the view with the UInt64 causes the error, while the other view with Int64 doesn't. As far as I understand, both views point to the same memory location and have essentially the same structure, except for that UInt64 vs Int64 difference. Looks like some function implementation is missing for UInt64. So this error looks like a bug to me.
julia> versioninfo()
Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin18.7.0)
CPU: Intel(R) Core(TM) i5-3330S CPU @ 2.70GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, ivybridge)
The text was updated successfully, but these errors were encountered:
Below is a copy of the issue I opened in the Clustering.jl repo. In the comments of that issue it was suggested that I open an issue here, so here it is.
I'm trying to run clustering on a view with indices of type
UInt64
, but getting the error in the title.Code:
Output:
/Users/forcebru/test/uint64_view.jl:11
is the last line of the code above.Now the important part is that this error doesn't appear when I use regular signed integers when indexing. Changing
@view data[1:UInt64(50)]
to@view data[1:50]
"solves" this error. I find it very strange that the type of the index has an effect on the processing of the view. I understand that the view with theUInt64
index is of typeSubArray{Float64, 1, Vector{Float64}, Tuple{UnitRange{UInt64}}, true}
, which involvesUInt64
, while an "ordinary" view like@view data[1:50]
is of typeSubArray{Float64, 1, Vector{Float64}, Tuple{UnitRange{Int64}}, true}
, now withInt64
. So, the type of the index is reflected in the type of the view, which makes sense.What I don't understand is why the view with the
UInt64
causes the error, while the other view withInt64
doesn't. As far as I understand, both views point to the same memory location and have essentially the same structure, except for thatUInt64
vsInt64
difference. Looks like some function implementation is missing forUInt64
. So this error looks like a bug to me.The text was updated successfully, but these errors were encountered: