oseledets/ttpy

Negative rank on 2-d tensors (matrices)

Closed this issue · 3 comments

Example:

A = np.array(
[[  1.,   3.],
 [  2.,   4.]])
print tt.tensor(A)

This is a 2-dimensional tensor
r(0)=1, n(0)=2
r(1)=-101, n(1)=2
r(2)=1

For matrixes use tt.matrix()

tt.matrix(tt.tensor(np.random.rand(4, 4)))

This is a 2-dimensional matrix
r(0)=1, n(0)=2, m(0)=2
r(1)=-19, n(1)=2, m(1)=2
r(2)=1

Fixed (finally) pull the latest version