Macaulay2 / Macaulay2/M2

tensor(list of Lists) produces something useless

Open
#3,971 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Core
Dominant language
Macaulay2
Stars
435
Forks
297
Avg merge
4d 20h
Merged PRs (30d)
11

Description

This is not good:
```
i1 : tensor({1,2,3},{4,5,6},{7,8,9})

o1 = {((1, 4), 7), ((1, 4), 8), ((1, 4), 9), ((1, 5), 7), ((1, 5), 8), ((1, 5), 9), ((1, 6), 7), ((1, 6), 8), ((1, 6), 9), ((2, 4), 7), ((2, 4), 8), ((2, 4), 9), ((2,
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
5), 7), ((2, 5), 8), ((2, 5), 9), ((2, 6), 7), ((2, 6), 8), ((2, 6), 9), ((3, 4), 7), ((3, 4), 8), ((3, 4), 9), ((3, 5), 7), ((3, 5), 8), ((3, 5), 9), ((3, 6),
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
7), ((3, 6), 8), ((3, 6), 9)}

o1 : List
```
What we should get, ideally, is triples of elements.

Relatedly, there should be a `List^**ZZ` that produces tuples of elements of a list.

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 with the tensor(list of Lists) example and the proposed List^**ZZ behavior; locate the existing tensor and list-power entry points. Determine how nested lists should produce triples rather than Cartesian products, and define the corresponding List^**ZZ result. Done when the example returns triples and the related operator has the requested behavior, with tests covering both.

Written by the indexing model from the issue text.

Assessment

Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.