Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Any array in several indices is using a tensor product.

    x[1][2][3]
On StackOverflow, I asked about making an multiplication table in Python.

    [[a*b for a in x] for b in y]
or in NumPy

    x[..., None]*y[None,...]
This is an example of a tensor product between two arrays in order to get a matrix.

http://stackoverflow.com/questions/20501073/product-of-array...



That's a cartesian product, not a tensor product.


the outer product is the tensor product of two vectors https://en.wikipedia.org/wiki/Outer_product


Could that be the start of an introduction to tensor products or even tensors in general ? Start with cartesian product ( or maybe even sql joins ? ) and generalize ? It's probably much more intuitive to us developpers than vector products ( unless you're in 3D graphics or physic engine of course )


I'd read an article like that.


absolutely. I am doing a minitature sql join.

other database operations may have similar interpretations in terms of vector spaces.

math - when it works - is a layer of abstraction unifying several different-looking experiences.


I think it might be a bit more correct to call it the outer product.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: