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

reduce fails when provided with init parameter #80

Closed
andreyz4k opened this issue Aug 1, 2022 · 0 comments · Fixed by #86
Closed

reduce fails when provided with init parameter #80

andreyz4k opened this issue Aug 1, 2022 · 0 comments · Fixed by #86

Comments

@andreyz4k
Copy link

julia> A
7x7 GraphBLAS int64_t matrix, bitmap by row
  12 entries, memory: 649 bytes

    (1,2)   1
    (1,4)   2
    (2,5)   3
    (2,7)   4
    (3,6)   5
    (4,1)   6
    (4,3)   7
    (5,6)   8
    (6,3)   9
    (7,3)   10
    (7,4)   11
    (7,5)   12


julia> reduce(max, A)
12

julia> reduce(max, A; init=100)
ERROR: MethodError: no method matching GBScalar{Int64}(::Int64)
Closest candidates are:
  GBScalar{T}() where T at ~/.julia/packages/SuiteSparseGraphBLAS/5AOj3/src/scalar.jl:3
  GBScalar{T}(::Ptr{SuiteSparseGraphBLAS.LibGraphBLAS.GB_Scalar_opaque}) where T at ~/.julia/packages/SuiteSparseGraphBLAS/5AOj3/src/types.jl:236
Stacktrace:
 [1] reduce(op::Function, A::GBMatrix{Int64, Nothing}; dims::Function, typeout::Nothing, init::Int64, mask::Nothing, accum::Nothing, desc::Nothing)
   @ SuiteSparseGraphBLAS ~/.julia/packages/SuiteSparseGraphBLAS/5AOj3/src/operations/reduce.jl:44
 [2] top-level scope
   @ REPL[42]:1
rayegun added a commit that referenced this issue Aug 16, 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

Successfully merging a pull request may close this issue.

1 participant