Would those then be tensors?
Matrices are Tensors but with the matrix product operator instead of the tensor product operator.
Pandas supports MultiIndex DataFrames but the pandas docs recommend xarray for 3D and N-Dimensional data.
xarray supports N-Dimensional data as for example NetCDF but not tensor arithmetic.
xarray_jax: https://github.com/google-deepmind/xarray_jax :
> This library solves that problem. It registers xarray data structures as custom JAX PyTrees. This allows JAX to seamlessly flatten xarray objects into their raw arrays for accelerated computation and then unflatten the results back into fully labeled xarray objects, preserving critical metadata like dimension names and coordinates.
flatten and unflatten with datatypes is necessary for unrolling loops for performance.
Which is the correct logic for probabilistic logic, for expressions with frequentist or symbolic distributions as values? Are quantum logic and quantum statistical mechanics the appropriate or useful tools for all probabilistic logic?
dist_a1 <operator> dist_a2
uncertainties does mean±dev in Python with numpy types.
From https://news.ycombinator.com/item?id=41411280 :
> W3C CSVW supports per-column schema. ( with URIs for datatypes )
> Serialize a dict containing a value with uncertainties and/or Pint (or astropy.units) and complex values to JSON, then read it from JSON back to the same types. Handle datetimes, complex values, and categoricals
IEEE-754 specifies NaN (null), ±0, three infinities (positive, negative, and unsigned), but IEEE-754 does not specify a representation for categoricals, datetimes (like ISO8601), or complex numbers.
XSD (XML Schema Datatypes), which RDFS vocabularies often use to specify the rdfs:range of an rdfs:Property, does not specify how to specify abstract complex numbers; but OpenMath RDF, and QUDT (Quantities, Units, Dimensions, and Types) and OM Ontology all have a way to save complex numbers to disk, too.
The matrix product is not something specific to matrices, but it is a particular case of the contracted tensor product.
(While now almost everybody uses the names "tensor product" and "contracted tensor product", historically these names are wrong. Better names, which do not misuse the word "tensor", would have been "Zehfuss product" and "Cayley product", after the names of the mathematicians who have introduced them.)
The word "tensor" has become increasingly corrupted over the years. Originally, it had a meaning that matched its etymology, i.e. "tensor" meant "symmetric matrix", because a matrix could be decomposed through the polar decomposition into a tensor and a versor (i.e. a symmetric matrix and a rotation matrix).
Then what is now called tensor theory was created by Ricci, but without ever using the word "tensor". The meaning of the word "tensor" was changed by Einstein in his theory of the general relativity, where for unknown reasons he chose this word to refer to arrays with an arbitrary number of dimensions that satisfy a certain kind of transformation relationships when the systems of coordinates is changed.
After WWII, due to the huge popularity of Einstein, this weird usage of the word has become widespread.
Then for many decades tensors were just a subset of arrays, those that are changed in a certain specific way when the system of coordinates is changed.
Eventually, there was the second corruption of the word "tensor" which is completely unjustified, when "tensor" has become just a synonym for "array".
Vectors are 1-dimensional arrays (though originally, like tensors, vectors were only a subset of 1-dimensional arrays), matrices are 2-dimensional arrays and nowadays "tensors" means just "arrays", i.e. of an arbitrary dimension.
The tensor product and the contracted tensor product are defined for arrays of arbitrary dimensions. For 2-dimensional arrays the contracted tensor product is a.k.a. matrix product, and for 1-dimensional arrays it is a.k.a. scalar product.