Opened 3 years ago
Closed 2 years ago
#29248 closed defect (fixed)
Index notation for tensors should allow for unicode characters
Reported by:  Eric Gourgoulhon  Owned by:  

Priority:  major  Milestone:  sage9.2 
Component:  geometry  Keywords:  tensor, indices 
Cc:  Léo Brunswic, Eric Gourgoulhon, Travis Scrimshaw, Michael Jung  Merged in:  
Authors:  Matthias Koeppe  Reviewers:  Eric Gourgoulhon 
Report Upstream:  N/A  Work issues:  
Branch:  4d8305f (Commits, GitHub, GitLab)  Commit:  4d8305faf557774ff67bbb47cd0d76bb06fe71d0 
Dependencies:  Stopgaps: 
Description (last modified by )
In Sage 9.0, we have:
sage: E.<x,y> = EuclideanSpace() sage: t = E.tensor_field(1, 1, [[x, 1], [0, y]]) sage: t['^μ_μ'] ... ValueError: index conventions not satisfied
Now, after the Python 3 switch, any unicode nondigit wordconstituent character should be accepted, see this discussion. This is especially pertinent for tensor indices, since Greek letters are often used to denote them.
Change History (12)
comment:1 Changed 3 years ago by
Cc:  Léo Brunswic added 

comment:2 Changed 3 years ago by
Milestone:  sage9.1 → sage9.2 

comment:3 Changed 2 years ago by
Branch:  → u/mkoeppe/index_notation_for_tensors_should_allow_for_unicode_characters 

comment:4 Changed 2 years ago by
Authors:  → Matthias Koeppe 

Cc:  Eric Gourgoulhon Travis Scrimshaw Michael Jung added 
Commit:  → ab2beb1e59cce64866e15d675fd88108fd8610ad 
Status:  new → needs_review 
New commits:
ab2beb1  sage.tensor.modules.tensor_with_indices: Allow unicode indices (nondigit word constituents)

comment:5 Changed 2 years ago by
Description:  modified (diff) 

comment:6 Changed 2 years ago by
Reviewers:  → Eric Gourgoulhon 

Status:  needs_review → positive_review 
Thanks for this improvement! LGTM.
comment:9 Changed 2 years ago by
Commit:  ab2beb1e59cce64866e15d675fd88108fd8610ad → 4d8305faf557774ff67bbb47cd0d76bb06fe71d0 

Branch pushed to git repo; I updated commit sha1. New commits:
4d8305f  src/sage/tensor/modules/tensor_with_indices.py: Use unicode escapes instead of characters in docstrings, so that pdf doc builds

comment:10 Changed 2 years ago by
Status:  needs_work → needs_review 

comment:12 Changed 2 years ago by
Branch:  u/mkoeppe/index_notation_for_tensors_should_allow_for_unicode_characters → 4d8305faf557774ff67bbb47cd0d76bb06fe71d0 

Resolution:  → fixed 
Status:  positive_review → closed 
Note: See
TracTickets for help on using
tickets.
Batch modifying tickets that will likely not be ready for 9.1, based on a review of the ticket title, branch/review status, and last modification date.