JuliaSparse / SuiteSparseGraphBLAS.jl

Sparse, General Linear Algebra for Graphs!
MIT License
102 stars 16 forks source link

Slice indexing (getindex) doesn't work for GBVectors while setindex! appears to be OK #113

Closed macd closed 10 months ago

macd commented 1 year ago
macd@macd-NUC9:~/jlang$ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.10.0-DEV.687 (2023-03-02)
 _/ |\__'_|_|_|\__'_|  |  Commit dbcac4335f (1 day old master)
|__/                   |

julia @v1.10> using SuiteSparseGraphBLAS

julia @v1.10> g = GBVector(rand(10));

julia @v1.10> g[1:3]
ERROR: UndefVarError: `C` not defined
Stacktrace:
 [1] extract!(w::GBVector{Float64, Float64}, u::GBVector{Float64, Float64}, I::UnitRange{Int64}; mask::Nothing, accum::Nothing, desc::Nothing)
   @ SuiteSparseGraphBLAS ~/jlang/SuiteSparseGraphBLAS.jl/src/operations/extract.jl:137
 [2] extract!
   @ ~/jlang/SuiteSparseGraphBLAS.jl/src/operations/extract.jl:133 [inlined]
 [3] #extract#244
   @ ~/jlang/SuiteSparseGraphBLAS.jl/src/operations/extract.jl:153 [inlined]
 [4] extract
   @ ~/jlang/SuiteSparseGraphBLAS.jl/src/operations/extract.jl:147 [inlined]
 [5] #getindex#318
   @ ~/jlang/SuiteSparseGraphBLAS.jl/src/abstractgbarray.jl:1031 [inlined]
 [6] getindex(u::GBVector{Float64, Float64}, i::UnitRange{Int64})
   @ SuiteSparseGraphBLAS ~/jlang/SuiteSparseGraphBLAS.jl/src/abstractgbarray.jl:1027
 [7] top-level scope
   @ REPL[3]:1
rayegun commented 10 months ago

Fixed in 0.10.