Skip to content

Commit

Permalink
Add \(::RowVector, ::Number) and /(::Number, ::AbstractVector)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed Aug 1, 2017
1 parent 0c8aa2a commit 65a7f3b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions base/linalg/generic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,8 @@ end
(/)(A::AbstractVecOrMat, B::AbstractVecOrMat) = (B' \ A')'
# \(A::StridedMatrix,x::Number) = inv(A)*x Should be added at some point when the old elementwise version has been deprecated long enough
# /(x::Number,A::StridedMatrix) = x*inv(A)
\(v::RowVector, x::Number) = pinv(v)*x
/(x::Number, v::AbstractVector) = x*pinv(v)

cond(x::Number) = x == 0 ? Inf : 1.0
cond(x::Number, p) = cond(x)
Expand Down

0 comments on commit 65a7f3b

Please sign in to comment.