[sage-devel] Re: Feature Request: element-wise multiplication of matrices

2009-06-16 Thread Maurizio
+1 for including this function... I had made the same one, but mine is actually 5 times slower than the one proposed in trac 6245 :P Is it possible to not name it "hadamard_product"? Coming from MatLab, I've used it hundreds of time, but I would have never recognized that "hadamard_product" could

[sage-devel] Re: Feature Request: element-wise multiplication of matrices

2009-06-15 Thread William Stein
On Mon, Jun 15, 2009 at 8:39 PM, Jason Grout wrote: > > William Stein wrote: >> On Mon, Jun 15, 2009 at 7:34 PM, Jason Grout >> wrote: >>> Bill Hart wrote: Can I ask what applications this "Hadamard product" has? >> >> I've never used it, but I guess it must be really really important in >>

[sage-devel] Re: Feature Request: element-wise multiplication of matrices

2009-06-15 Thread Rob Beezer
On Jun 15, 10:34 am, Jason Grout wrote: > Also, a google search for hadamard product applications turns up > http://buzzard.ups.edu/courses/2007spring/projects/million-paper.pdf > (maybe Rob Beezer knows this person?) Elizabeth Million was a student in a course of mine a few years ago and this w

[sage-devel] Re: Feature Request: element-wise multiplication of matrices

2009-06-15 Thread Dag Sverre Seljebotn
Jason Grout wrote: > William Stein wrote: >> On Mon, Jun 15, 2009 at 7:34 PM, Jason Grout >> wrote: >>> Bill Hart wrote: Can I ask what applications this "Hadamard product" has? >> I've never used it, but I guess it must be really really important in >> numerical computation, since most shoc

[sage-devel] Re: Feature Request: element-wise multiplication of matrices

2009-06-15 Thread Dag Sverre Seljebotn
William Stein wrote: > On Mon, Jun 15, 2009 at 7:34 PM, Jason Grout > wrote: >> Bill Hart wrote: >>> Can I ask what applications this "Hadamard product" has? > > I've never used it, but I guess it must be really really important in > numerical computation, since most shockingly it is the *defaul

[sage-devel] Re: Feature Request: element-wise multiplication of matrices

2009-06-15 Thread Jason Grout
William Stein wrote: > On Mon, Jun 15, 2009 at 7:34 PM, Jason Grout > wrote: >> Bill Hart wrote: >>> Can I ask what applications this "Hadamard product" has? > > I've never used it, but I guess it must be really really important in > numerical computation, since most shockingly it is the *defaul

[sage-devel] Re: Feature Request: element-wise multiplication of matrices

2009-06-15 Thread William Stein
On Mon, Jun 15, 2009 at 7:34 PM, Jason Grout wrote: > > Bill Hart wrote: >> Can I ask what applications this "Hadamard product" has? I've never used it, but I guess it must be really really important in numerical computation, since most shockingly it is the *default* for A*B in numpy!! sage: imp

[sage-devel] Re: Feature Request: element-wise multiplication of matrices

2009-06-15 Thread Jason Grout
Bill Hart wrote: > Can I ask what applications this "Hadamard product" has? (Tim: The term is from linear algebra) http://en.wikipedia.org/wiki/Matrix_multiplication#Hadamard_product says it is used in JPG compression, for example. http://planetmath.org/encyclopedia/HadamardProduct.html Also,

[sage-devel] Re: Feature Request: element-wise multiplication of matrices

2009-06-15 Thread Tim Lahey
On Jun 15, 2009, at 1:14 PM, Bill Hart wrote: > > Can I ask what applications this "Hadamard product" has? > > Bill. I've never heard it called that, but element-wise multiplication is useful for tensors. Cheers, Tim. --- Tim Lahey PhD Candidate, Systems Design Engineering University of Wate

[sage-devel] Re: Feature Request: element-wise multiplication of matrices

2009-06-15 Thread Bill Hart
Can I ask what applications this "Hadamard product" has? Bill. On 15 June, 17:32, William Stein wrote: > On Mon, Jun 15, 2009 at 6:17 PM, John Cremona wrote: > > > 2009/6/15 Jason Grout : > > >> William Stein wrote: > >>> On Mon, Jun 15, 2009 at 5:26 PM, paramaniac > >>> wrote: > > Sorry,

[sage-devel] Re: Feature Request: element-wise multiplication of matrices

2009-06-15 Thread William Stein
On Mon, Jun 15, 2009 at 6:17 PM, John Cremona wrote: > > 2009/6/15 Jason Grout : >> >> William Stein wrote: >>> On Mon, Jun 15, 2009 at 5:26 PM, paramaniac wrote: > Sorry, I don't understand your example. > If > A1 = matrix([[a1,b1],[c1,d1]]) > A2 = matrix([[a2,b2],[c2,d2]]) >

[sage-devel] Re: Feature Request: element-wise multiplication of matrices

2009-06-15 Thread John Cremona
2009/6/15 Jason Grout : > > William Stein wrote: >> On Mon, Jun 15, 2009 at 5:26 PM, paramaniac wrote: Sorry, I don't understand your example. If A1 = matrix([[a1,b1],[c1,d1]]) A2 = matrix([[a2,b2],[c2,d2]]) then >>> A1.*A2 = matrix([[a1*a2, b1*b2],[c1*c2, d1*d2]]) >>> >>

[sage-devel] Re: Feature Request: element-wise multiplication of matrices

2009-06-15 Thread Jason Grout
William Stein wrote: > On Mon, Jun 15, 2009 at 5:26 PM, paramaniac wrote: >>> Sorry, I don't understand your example. >>> If >>> A1 = matrix([[a1,b1],[c1,d1]]) >>> A2 = matrix([[a2,b2],[c2,d2]]) >>> then >> A1.*A2 = matrix([[a1*a2, b1*b2],[c1*c2, d1*d2]]) >> > > (1) we aren't going to add the .*

[sage-devel] Re: Feature Request: element-wise multiplication of matrices

2009-06-15 Thread William Stein
On Mon, Jun 15, 2009 at 5:26 PM, paramaniac wrote: > >> Sorry, I don't understand your example. >> If >> A1 = matrix([[a1,b1],[c1,d1]]) >> A2 = matrix([[a2,b2],[c2,d2]]) >> then > > A1.*A2 = matrix([[a1*a2, b1*b2],[c1*c2, d1*d2]]) > (1) we aren't going to add the .* notation A1 .* A2 to sage, sin

[sage-devel] Re: Feature Request: element-wise multiplication of matrices

2009-06-15 Thread paramaniac
> Sorry, I don't understand your example. > If > A1 = matrix([[a1,b1],[c1,d1]]) > A2 = matrix([[a2,b2],[c2,d2]]) > then A1.*A2 = matrix([[a1*a2, b1*b2],[c1*c2, d1*d2]]) Regards, Lukas --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegr

[sage-devel] Re: Feature Request: element-wise multiplication of matrices

2009-06-15 Thread Jason Grout
paramaniac wrote: > Dear Sage Developers, > > It would be very nice if Sage supported the element-wise > multiplication of matrices like the .* operator in Octave/Matlab. > I was about to point out the recent thread about this, but then realized it was you that started that thread and acknowl

[sage-devel] Re: Feature Request: element-wise multiplication of matrices

2009-06-15 Thread David Joyner
Sorry, I don't understand your example. If A1 = matrix([[a1,b1],[c1,d1]]) A2 = matrix([[a2,b2],[c2,d2]]) then A1.*A2 = On Mon, Jun 15, 2009 at 10:52 AM, paramaniac wrote: > > Dear Sage Developers, > > It would be very nice if Sage supported the element-wise > multiplication of matrices lik