Named Tensors
nlp.seas.harvard.edu
nlp.seas.harvard.edu
https://pytorch.org/docs/stable/named_tensor.html
Integration's still ongoing mind you, so it's not yet a complete replacement for 'traditional' indexing.
And in other packages, such as [AxisArrays.jl](https://github.com/JuliaArrays/AxisArrays.jl/) and [AxisKeys.jl](https://github.com/mcabbott/AxisKeys.jl). In fact, the AxisKeys README has [a nice overview of packages with similar functionality](https://github.com/mcabbott/AxisKeys.jl#elsewhere).
There is a small zoo of packages attaching also labels along the indices, alla python's xarray. Perhaps it's a little too easy to write such things... but once we understand the design space the hope is to quietly take most of them to the woodshed.
One nice integration with xarray is with an optimized data store like Zarr [1], TileDB [2] or Cloud-Optimized GeoTIFFs [3], where you can pull only the pieces of the nd-array relevant to your problem, rather than downloading a large monolithic netCDF4 file.
Another great integration in the xarray ecosystem is Dask [4], which is a very thoughtful abstraction over parallelizing computations across your nd-array.
The notion to put name derivation on operations is probably more trouble than it's worth. Random new ops will never support it, leading to never predictable results.
Still this is all better than pandas. <Shudder> pandas.
There are some gotchas with the HDF5 reader trying to infer dimension relationships that aren't specified in files. Sometimes merging datasets can wrong: if a 'join' is supposed to take place along a dimension whose values are floats, the result will be empty even if there is machine-epsilon offset between the two versions of the same dimension. Or,you can get an 'outer product' by accident and crash the interpreter by trying to allocate too much memory.
Yeah, I do the same. Just write a thin wrapper and hook torch in the __init__.py.
But ragging on pandas isn't cool. Pandas is probably the most important factor driving python's popularity over the past decade.
Pandas promotes bad software practices in my experience with it's horrible bloated interface. It has cost me a lot of time-- for no benefit whatsoever. I am actually pretty sure it was released to slow the pace of competing quantitative hedge funds.
Too bad nothing really uses or propagates those names though.
People who learn about tensors and vectors in the culture of Mechanical Engineering, Applied Mathematics, or Physics, are strenuously trained that a "vector" is not just any list of numbers, but a specific mathematical object with specific properties. (Similarly with tensors.) In that culture, the use of the term "vector" the way it is used in Software Engineering looks quite odd. An undergraduate might even have a problem set that shows various number triples and be asked to identify which ones are vectors and which ones aren't.
I was educated under that system, but spent years as a software engineer, so I am comfortable switching between the two contexts. When I wear my Software Engineer hat, I am quite comfortable with the generalized use of vector and tensor as done in software and ML, but for someone who has only grown up in one culture, it looks very wrong.
linear transformations : matrices :: multilinear transformations : tensors. T: V x V x V x ... x V^* x V^* x V^* -> F
You're mixing up geometric objects (multilinear transformations) with their coordinate representations. A geometric object, such as a multilinear map, is automatically invariant to the coordinate system. An array of numbers, like a matrix, is not.