Skip to content

Commit e568d46

Browse files
committed
Update
1 parent ae06e53 commit e568d46

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/ndsparsearray.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -601,12 +601,8 @@ function mul!(A::NDSparseArray{T}, scalar) where {T}
601601
return A
602602
end
603603

604-
try
605-
if scalar == one(typeof(scalar))
606-
return A
607-
end
608-
catch MethodError
609-
# one() not defined for this type, continue
604+
if isone(scalar)
605+
return A
610606
end
611607

612608
# Multiply all stored values, converting scalar to A's type

0 commit comments

Comments
 (0)