# Dynamically constructing symbolic tensors

Is there any way to construct tensor of any given dimension d and rank r with symbolic entries? i.e., instead of manually constructing one as

Table[T[i,j,k],{i,1,10},{i,1,10},{i,1,10}]

for d=3 and r=10, I wish to only feed values of d and r and let Mathematica generate such a tensor.

• Array[T, ConstantArray[10, 3]]? – J. M.'s torpor May 31 '16 at 3:06

tensor[d_, r_] := Outer[t, ##] & @@ ConstantArray[Range[r], d]