On Mon, Jun 15, 2009 at 7:34 PM, Jason Grout<jason-s...@creativetrax.com> 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: import numpy
sage: a = numpy.array([[1,2],[3,4]])
sage: a*a
array([[1, 4],
       [9, 16]], dtype=object)

The above seems so utterly insanely wrong to a mathematician like me,
it boggles my mind every time I see it :-).

I once years ago benchmarked numpy for matrix multiplication and
didn't realize that it does it componentwise, and was just shocked
that somehow they seemed to have found an O(n^2) algorithm :-).

William




>
> (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, 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?)
>
> Perhaps naming the function "hadamard_product" isn't the best idea if
> this term is not generally known.  I can imagine it would cause some
> problems for people trying to find it if they didn't know the name...
>
> Thanks,
>
> Jason
>
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to