Skip to content

Commit 3eb4266

Browse files
author
Wimmerer
committed
Fix bad check in mul, reduce default to colon
1 parent 07a6af8 commit 3eb4266

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ContextVariablesX = "6add18c4-b38d-439d-96f6-d6bc489c04c5"
1212
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
1313
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1414
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
15+
MatrixDepot = "b51810bb-c9f3-55da-ae3c-350fc1fbce05"
1516
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1617
SSGraphBLAS_jll = "7ed9a814-9cab-54e9-8e9e-d9e95b4d61b1"
1718
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

src/operations/mul.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function mul(
9494
desc = nothing
9595
)
9696
op = _handlectx(op, ctxop, Semirings.PLUS_TIMES)
97-
if op isa libgb.GrB_Semiring || throw(ArgumentError("$op is not a valid libgb.GrB_Semiring"))GrBOp
97+
if op isa libgb.GrB_Semiring
9898
t = ztype(op)
9999
else
100100
t = optype(A, B)
@@ -105,8 +105,6 @@ function mul(
105105
C = GBVector{t}(size(A, 1))
106106
elseif A isa GBMatOrTranspose && B isa GBMatOrTranspose
107107
C = GBMatrix{t}(size(A, 1), size(B, 2))
108-
else
109-
throw(ArgumentError("Cannot multiply A::GBVector, B::GBVector. Try emul"))
110108
end
111109
mul!(C, A, B, op; mask, accum, desc)
112110
return C

src/operations/reduce.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ end
1212
function Base.reduce(
1313
op::MonoidUnion,
1414
A::GBMatOrTranspose;
15-
dims = 2,
15+
dims = :,
1616
typeout = nothing,
1717
init = nothing,
1818
mask = nothing,

0 commit comments

Comments
 (0)