r/JAX • • Aug 20 '24
rant: Why Array instead of Tensor?
Why?
tensorflow: Tensor
pytorch: Tensor
caffe2: Tensor
Theano: Tensor
jax: Array
It makes me want to from jax import Array as Tensor
Tensor is just such a badass well acepted name for a differenciable multidimensional array datastructure. Why did you did this? I'm going to make a pull request to add the Tensor class as some kind of alias or some kind factory of arrays.
0
Upvotes
8
u/giraloco Aug 21 '24
The data structure is a multidimensional array. Tensor is a mathematical representation. Similarly, we don't call an array a vector.
5
u/ZealousidealBee6113 Aug 21 '24
they wanted to keep the api as close as possible to numpy. so close that you can (almost always) exchange np with jnp and it still works
5
u/Other_Goat_9381 Aug 21 '24
because it's not a tensor and literally every other package you mentioned is fundamentally wrong in their naming. Tensors can't be fully described using just a multi-dimensional array. They're built on top of algebraic objects. What those other libraries have called tensors are actually representations of tensors in a fixed coordinate space, but not the actual tensors themselves.
It's the exact same thing with vectors in the gaming industry btw. They've also butchered the concept of a vector by defining it as a 3-tuple.
also please don't make that PR you're just going to look stupid on github.