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

Document the new GBMatrix constructor #102

Open
CarloLucibello opened this issue Nov 8, 2022 · 0 comments
Open

Document the new GBMatrix constructor #102

CarloLucibello opened this issue Nov 8, 2022 · 0 comments

Comments

@CarloLucibello
Copy link

CarloLucibello commented Nov 8, 2022

In https://graphblas.juliasparse.org/dev/arrays/#Construction it is shown the now removed constructor
sporting nrows and ncols.

julia> GBMatrix([1,2],[2,3],[1,1], nrows=3, ncols=3)
ERROR: MethodError: no method matching GBMatrix(::Vector{Int64}, ::Vector{Int64}, ::Vector{Int64}; nrows=3, ncols=3)
Closest candidates are:
  GBMatrix(::AbstractVector, ::AbstractVector, ::AbstractVector{T}; combine, fill) where T at ~/.julia/packages/SuiteSparseGraphBLAS/hotIr/src/types.jl:431 got unsupported keyword arguments "nrows", "ncols"
  GBMatrix(::AbstractVector, ::AbstractVector, ::AbstractVector{T}, ::Any, ::Any; combine, fill) where T at ~/.julia/packages/SuiteSparseGraphBLAS/hotIr/src/types.jl:427 got unsupported keyword arguments "nrows", "ncols"
  GBMatrix(::AbstractVector, ::AbstractVector, ::T; fill) where T at ~/.julia/packages/SuiteSparseGraphBLAS/hotIr/src/types.jl:462 got unsupported keyword arguments "nrows", "ncols"
  ...
Stacktrace:
 [1] kwerr(::NamedTuple{(:nrows, :ncols), Tuple{Int64, Int64}}, ::Type, ::Vector{Int64}, ::Vector{Int64}, ::Vector{Int64})
   @ Base ./error.jl:165
 [2] top-level scope
   @ REPL[12]:1

It should be replaced with

julia> GBMatrix([1,2],[2,3],[1,1], 3, 3)
3x3 GraphBLAS int64_t matrix, bitmap by row
  2 entries, memory: 225 bytes
  iso value:   1

    (1,2)   1
    (2,3)   1
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