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

Missing matrix division dispatches #502

Closed
pao opened this issue Mar 2, 2012 · 6 comments
Closed

Missing matrix division dispatches #502

pao opened this issue Mar 2, 2012 · 6 comments
Labels
status:help wanted Indicates that a maintainer wants help on an issue or pull request

Comments

@pao
Copy link
Member

pao commented Mar 2, 2012

There's no dispatch for matrix division between Int32 and Float64, and probably others.

julia> [1 0 0; 0 1 0; 0 0 1]\[1.;2;4]
no method /(Array{Float64,1},Array{Int32,2})
 in method_missing at /home/patrick/julia/j/base.j:58
 in \ at /home/patrick/julia/j/operators.j:59

julia> [1. 0 0; 0 1 0; 0 0 1]\[1;2;4]
no method /(Array{Int32,1},Array{Float64,2})
 in method_missing at /home/patrick/julia/j/base.j:58
 in \ at /home/patrick/julia/j/operators.j:59

After watching Jeff's presentation, I was feeling confident I could figure out how to fix it. Unfortunately my grep-fu is failing me and I can't track down where AbstractMatrix/AbstractMatrix is defined. Any pointers?

@StefanKarpinski
Copy link
Sponsor Member

The file is abstractarray.j, but I can't promise that's the right place to do it. Concrete array stuff is defined in array.j.

@pao
Copy link
Member Author

pao commented Mar 2, 2012

AbstractArray/Number and Number/AbstractArray, but not AbstractArray/AbstractArray are in abstractarray.j; array.j doesn't seem to define matrix division either. I also checked linalg.j. I can see that it actually works, though, as long as the number types line up. (We need a debugger!)

@StefanKarpinski
Copy link
Sponsor Member

We definitely need a debugger. Jeff and I concocted a plan for a debugger which basically involved JITing debug versions of code with debug hooks inserted into the AST at appropriate places. This is kind of similar to how I believe the perl debugger works.

@Keno
Copy link
Member

Keno commented Mar 2, 2012

LLVM has debugging capabilities for JIT with gdb. We could probably make use of that.

@pao pao mentioned this issue Mar 2, 2012
@ViralBShah
Copy link
Member

Matrix division stuff is in linalg_lapack.j. Just need to add a bunch of methods that do the right promotions.

@pao
Copy link
Member Author

pao commented Mar 3, 2012

Excellent, found it. Thanks for the pointer, Viral!

LilithHafner pushed a commit to LilithHafner/julia that referenced this issue Oct 11, 2021
Since `eweights` is now being exported we should bump the minor version number
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:help wanted Indicates that a maintainer wants help on an issue or pull request
Projects
None yet
Development

No branches or pull requests

5 participants