oseledets / oseledets/ttpy

How to reshape a matrix to a vector

Open
#59 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
264
Forks
73
PR merge metrics
No merged PRs in 30d

Description

Is it possible to use the implemented reshape function to reshape a matrix to a vector? I have a matrix A(i_1, ...i_d, j_1...j_d) in TT format and I want to reshape it to a vector with the following structure:

A = A_1(i_1,j_1) A_2(i_2,j_2) ... -> B_1(i_1) B_1(i_2)...B_d(i_d) B_{d+1}(j_1) ...B_{2d}(j_d)

The reshape function of a matrix seems to work only with a pair of indices, and I cannot find an example of tensor reshaping.

Thanks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the implemented reshape function and its handling of matrix index pairs. Determine whether reshaping a TT matrix into the requested vector ordering is supported, then document the applicable usage or clarify the limitation with a tensor-reshaping example.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.