The Tensor type

Missing docstring.

Missing docstring for Tensor. Check Documenter's build log for details.

You can create a Tensor by passing an array and a list of Symbols that name indices.


julia> T = Tensor(rand(3,5,2), (:i,:j,:k))3×5×2 Tensor{Float64, 3, Array{Float64, 3}}: [:, :, 1] = 0.0616966 0.577806 0.403239 0.761988 0.726187 0.813486 0.750991 0.43216 0.880598 0.772245 0.0720981 0.905786 0.572664 0.416797 0.927191 [:, :, 2] = 0.749914 0.783945 0.372005 0.550106 0.785076 0.984747 0.68506 0.0278892 0.881148 0.322137 0.152704 0.60585 0.0491073 0.965272 0.1507

The dimensionality or size of each index can be consulted using the size function.

Base.sizeMethod
Base.size(::Tensor[, i])

Return the size of the underlying array or the dimension i (specified by Symbol or Integer).

source
julia> size(T)(3, 5, 2)
julia> size(T, :j)5
julia> length(T)30

Metadata

Tensors may contain some metadata.

🚧 Work in progress 🚧

Currently there are only methods for accessing and modifying Tags.

Tags