-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Added right matrix division #613
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
Merged
JeffBezanson
merged 1 commit into
JuliaLang:master
from
carlobaldassi:right_matrix_division
Mar 19, 2012
Merged
Added right matrix division #613
JeffBezanson
merged 1 commit into
JuliaLang:master
from
carlobaldassi:right_matrix_division
Mar 19, 2012
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JeffBezanson
added a commit
that referenced
this pull request
Mar 19, 2012
Added right matrix division
I wouldn't be surprised if Matlab isn't actually doing the transpositions. We probably are. I suspect @ViralBShah can provide a transpose-free implementation. |
Keno
added a commit
that referenced
this pull request
Jan 25, 2019
Fixes the following issue: ``` julia> invoke(sin, Tuple{NoMethodsDefinedHere}, NoMethodsDefinedHere()) ERROR: ┌ Error: Error showing method candidates, aborted │ exception = │ MethodError: no method matching length(::Type{Tuple{NoMethodsDefinedHere}}) │ Closest candidates are: │ length(::Core.SimpleVector) at essentials.jl:582 │ length(::Base.MethodList) at reflection.jl:732 │ length(::Core.MethodTable) at reflection.jl:806 │ ... │ Stacktrace: │ [1] show_method_candidates(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MethodError, ::Any) at ./errorshow.jl:387 │ [2] showerror(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MethodError) at ./errorshow.jl:255 │ [3] (::getfield(Base, Symbol("##613#614")){MethodError})(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}) at ./errorshow.jl:76 │ [4] #with_output_color#660(::Bool, ::Function, ::Function, ::Symbol, ::IOContext{REPL.Terminals.TTYTerminal}) at ./util.jl:366 │ [5] with_output_color(::Function, ::Symbol, ::IOContext{REPL.Terminals.TTYTerminal}) at ./util.jl:364 │ [6] #showerror#612(::Bool, ::Function, ::IOContext{REPL.Terminals.TTYTerminal}, ::MethodError, ::Array{Union{Ptr{Nothing}, InterpreterIP},1}) at ./errorshow.jl:75 │ [7] showerror at ./errorshow.jl:74 [inlined] │ [8] display_error(::IOContext{REPL.Terminals.TTYTerminal}, ::MethodError, ::Array{Union{Ptr{Nothing}, InterpreterIP},1}) at ./client.jl:99 │ [9] #invokelatest#1 at ./essentials.jl:697 [inlined] │ [10] invokelatest at ./essentials.jl:696 [inlined] │ [11] print_response(::IO, ::Any, ::Any, ::Bool, ::Bool, ::Any) at /home/keno/julia-1.0/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:149 │ [12] print_response(::REPL.AbstractREPL, ::Any, ::Any, ::Bool, ::Bool) at /home/keno/julia-1.0/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:140 │ [13] (::getfield(REPL, Symbol("#do_respond#38")){Bool,getfield(REPL, Symbol("##48#57")){REPL.LineEditREPL,REPL.REPLHistoryProvider},REPL.LineEditREPL,REPL.LineEdit.Prompt})(::Any, ::Any, ::Any) at /home/keno/julia-1.0/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:714 │ [14] #invokelatest#1 at ./essentials.jl:697 [inlined] │ [15] invokelatest at ./essentials.jl:696 [inlined] │ [16] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /home/keno/julia-1.0/usr/share/julia/stdlib/v1.1/REPL/src/LineEdit.jl:2268 │ [17] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /home/keno/julia-1.0/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:1035 │ [18] run_repl(::REPL.AbstractREPL, ::Any) at /home/keno/julia-1.0/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:192 │ [19] (::getfield(Base, Symbol("##723#725")){Bool,Bool,Bool,Bool})(::Module) at ./logging.jl:311 │ [20] #invokelatest#1 at ./essentials.jl:697 [inlined] │ [21] invokelatest at ./essentials.jl:696 [inlined] │ [22] macro expansion at ./logging.jl:308 [inlined] │ [23] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:330 │ [24] exec_options(::Base.JLOptions) at ./client.jl:242 │ [25] _start() at ./client.jl:421 └ @ Base errorshow.jl:257 MethodError: no method matching sin(::NoMethodsDefinedHere) Stacktrace: [1] top-level scope at none:0 ```
Keno
added a commit
that referenced
this pull request
Jan 25, 2019
Fixes the following issue: ``` julia> invoke(sin, Tuple{NoMethodsDefinedHere}, NoMethodsDefinedHere()) ERROR: ┌ Error: Error showing method candidates, aborted │ exception = │ MethodError: no method matching length(::Type{Tuple{NoMethodsDefinedHere}}) │ Closest candidates are: │ length(::Core.SimpleVector) at essentials.jl:582 │ length(::Base.MethodList) at reflection.jl:732 │ length(::Core.MethodTable) at reflection.jl:806 │ ... │ Stacktrace: │ [1] show_method_candidates(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MethodError, ::Any) at ./errorshow.jl:387 │ [2] showerror(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MethodError) at ./errorshow.jl:255 │ [3] (::getfield(Base, Symbol("##613#614")){MethodError})(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}) at ./errorshow.jl:76 │ [4] #with_output_color#660(::Bool, ::Function, ::Function, ::Symbol, ::IOContext{REPL.Terminals.TTYTerminal}) at ./util.jl:366 │ [5] with_output_color(::Function, ::Symbol, ::IOContext{REPL.Terminals.TTYTerminal}) at ./util.jl:364 │ [6] #showerror#612(::Bool, ::Function, ::IOContext{REPL.Terminals.TTYTerminal}, ::MethodError, ::Array{Union{Ptr{Nothing}, InterpreterIP},1}) at ./errorshow.jl:75 │ [7] showerror at ./errorshow.jl:74 [inlined] │ [8] display_error(::IOContext{REPL.Terminals.TTYTerminal}, ::MethodError, ::Array{Union{Ptr{Nothing}, InterpreterIP},1}) at ./client.jl:99 │ [9] #invokelatest#1 at ./essentials.jl:697 [inlined] │ [10] invokelatest at ./essentials.jl:696 [inlined] │ [11] print_response(::IO, ::Any, ::Any, ::Bool, ::Bool, ::Any) at /home/keno/julia-1.0/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:149 │ [12] print_response(::REPL.AbstractREPL, ::Any, ::Any, ::Bool, ::Bool) at /home/keno/julia-1.0/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:140 │ [13] (::getfield(REPL, Symbol("#do_respond#38")){Bool,getfield(REPL, Symbol("##48#57")){REPL.LineEditREPL,REPL.REPLHistoryProvider},REPL.LineEditREPL,REPL.LineEdit.Prompt})(::Any, ::Any, ::Any) at /home/keno/julia-1.0/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:714 │ [14] #invokelatest#1 at ./essentials.jl:697 [inlined] │ [15] invokelatest at ./essentials.jl:696 [inlined] │ [16] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /home/keno/julia-1.0/usr/share/julia/stdlib/v1.1/REPL/src/LineEdit.jl:2268 │ [17] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /home/keno/julia-1.0/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:1035 │ [18] run_repl(::REPL.AbstractREPL, ::Any) at /home/keno/julia-1.0/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:192 │ [19] (::getfield(Base, Symbol("##723#725")){Bool,Bool,Bool,Bool})(::Module) at ./logging.jl:311 │ [20] #invokelatest#1 at ./essentials.jl:697 [inlined] │ [21] invokelatest at ./essentials.jl:696 [inlined] │ [22] macro expansion at ./logging.jl:308 [inlined] │ [23] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:330 │ [24] exec_options(::Base.JLOptions) at ./client.jl:242 │ [25] _start() at ./client.jl:421 └ @ Base errorshow.jl:257 MethodError: no method matching sin(::NoMethodsDefinedHere) Stacktrace: [1] top-level scope at none:0 ```
Keno
added a commit
that referenced
this pull request
Jan 28, 2019
Fixes the following issue: ``` julia> invoke(sin, Tuple{NoMethodsDefinedHere}, NoMethodsDefinedHere()) ERROR: ┌ Error: Error showing method candidates, aborted │ exception = │ MethodError: no method matching length(::Type{Tuple{NoMethodsDefinedHere}}) │ Closest candidates are: │ length(::Core.SimpleVector) at essentials.jl:582 │ length(::Base.MethodList) at reflection.jl:732 │ length(::Core.MethodTable) at reflection.jl:806 │ ... │ Stacktrace: │ [1] show_method_candidates(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MethodError, ::Any) at ./errorshow.jl:387 │ [2] showerror(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MethodError) at ./errorshow.jl:255 │ [3] (::getfield(Base, Symbol("##613#614")){MethodError})(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}) at ./errorshow.jl:76 │ [4] #with_output_color#660(::Bool, ::Function, ::Function, ::Symbol, ::IOContext{REPL.Terminals.TTYTerminal}) at ./util.jl:366 │ [5] with_output_color(::Function, ::Symbol, ::IOContext{REPL.Terminals.TTYTerminal}) at ./util.jl:364 │ [6] #showerror#612(::Bool, ::Function, ::IOContext{REPL.Terminals.TTYTerminal}, ::MethodError, ::Array{Union{Ptr{Nothing}, InterpreterIP},1}) at ./errorshow.jl:75 │ [7] showerror at ./errorshow.jl:74 [inlined] │ [8] display_error(::IOContext{REPL.Terminals.TTYTerminal}, ::MethodError, ::Array{Union{Ptr{Nothing}, InterpreterIP},1}) at ./client.jl:99 │ [9] #invokelatest#1 at ./essentials.jl:697 [inlined] │ [10] invokelatest at ./essentials.jl:696 [inlined] │ [11] print_response(::IO, ::Any, ::Any, ::Bool, ::Bool, ::Any) at /home/keno/julia-1.0/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:149 │ [12] print_response(::REPL.AbstractREPL, ::Any, ::Any, ::Bool, ::Bool) at /home/keno/julia-1.0/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:140 │ [13] (::getfield(REPL, Symbol("#do_respond#38")){Bool,getfield(REPL, Symbol("##48#57")){REPL.LineEditREPL,REPL.REPLHistoryProvider},REPL.LineEditREPL,REPL.LineEdit.Prompt})(::Any, ::Any, ::Any) at /home/keno/julia-1.0/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:714 │ [14] #invokelatest#1 at ./essentials.jl:697 [inlined] │ [15] invokelatest at ./essentials.jl:696 [inlined] │ [16] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /home/keno/julia-1.0/usr/share/julia/stdlib/v1.1/REPL/src/LineEdit.jl:2268 │ [17] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /home/keno/julia-1.0/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:1035 │ [18] run_repl(::REPL.AbstractREPL, ::Any) at /home/keno/julia-1.0/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:192 │ [19] (::getfield(Base, Symbol("##723#725")){Bool,Bool,Bool,Bool})(::Module) at ./logging.jl:311 │ [20] #invokelatest#1 at ./essentials.jl:697 [inlined] │ [21] invokelatest at ./essentials.jl:696 [inlined] │ [22] macro expansion at ./logging.jl:308 [inlined] │ [23] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:330 │ [24] exec_options(::Base.JLOptions) at ./client.jl:242 │ [25] _start() at ./client.jl:421 └ @ Base errorshow.jl:257 MethodError: no method matching sin(::NoMethodsDefinedHere) Stacktrace: [1] top-level scope at none:0 ```
ViralBShah
pushed a commit
that referenced
this pull request
May 17, 2025
Stdlib: SparseArrays URL: https://github.com/JuliaSparse/SparseArrays.jl.git Stdlib branch: main Julia branch: master Old commit: f3610c0 New commit: 6d072a8 Julia version: 1.13.0-DEV SparseArrays version: 1.12.0(Does not match) Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaSparse/SparseArrays.jl@f3610c0...6d072a8 ``` $ git log --oneline f3610c0..6d072a8 6d072a8 Lazily init cholmod (#626) 8ff11da fix libsuitesparseconfig bug (#625) fac1548 lazily init cholmod 75eaa18 fix libsuitesparseconfig bug 7b6e810 Use `libsuitesparseconfig` from JLL (#620) b225a85 Clarify pros, cons and limitations of Cholesky and LDLt (#621) 3d42644 Update index.md (#623) 16bbcbc 5-term mul! with Diagonal (#603) d050b1b Relax `eltype` in `Diagonal` `ldiv!`/`rdiv!` (#616) 4968cff `ldiv!` for `Diagonal` and a sparse vector (#613) 5062034 Fix `issymmetric` for matrices with empty columns (#606) 9a46561 Replace `v == zero(v)` with `_iszero` (#610) ``` Co-authored-by: IanButterworth <[email protected]>
jishnub
pushed a commit
that referenced
this pull request
Jun 14, 2025
…to cdbad55 (#58724) Stdlib: SparseArrays URL: https://github.com/JuliaSparse/SparseArrays.jl.git Stdlib branch: release-1.12 Julia branch: backports-release-1.12 Old commit: 72c7cac New commit: cdbad55 Julia version: 1.12.0-beta4 SparseArrays version: 1.12.0 Bump invoked by: @fredrikekre Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaSparse/SparseArrays.jl@72c7cac...cdbad55 ``` $ git log --oneline 72c7cac..cdbad55 cdbad55 Delete lock interface implementation from UmfpackLU (#617) 415bc9e [release-1.12] Run CI with Julia 1.12 (#635) d921308 fix libsuitesparseconfig bug f51dace Fix compat for SuiteSparse_jll fa9736c [release-1.12] Run CI with Julia 1.12 d1b0cd0 Backports for v1.12 (#624) e1817e8 Clarify pros, cons and limitations of Cholesky and LDLt (#621) b38f273 Use `libsuitesparseconfig` from JLL (#620) 66d65cc Relax `eltype` in `Diagonal` `ldiv!`/`rdiv!` (#616) 2ae8768 `ldiv!` for `Diagonal` and a sparse vector (#613) 08a15ca Replace `v == zero(v)` with `_iszero` (#610) 7ec2889 Fix `issymmetric` for matrices with empty columns (#606) f3610c0 SuiteSparse 7.10.1 wrappers and simpliefied wrapper generator process (#608) 9548149 Use `axes` instead of `1:size` (#602) ae727fe Explicitly import `Matrix` and `Vector` in CHOLMOD (#601) ce852af cleanup support for Float32 and ComplexF32 (#597) ``` Co-authored-by: fredrikekre <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I noticed there's no right matrix division in linarg_lapack. I added that just by defining
A / B = (B' \ A')'
. I'm not sure whether there's a better way to do this; however, transposition times are likely negligible compared to the elimination process. In fact, I tested both expressions in matlab and I found no difference in performance or result (exact floating-point equality) between the two, possibly meaning that it uses the same definition as above.