Opened 20 months ago
Closed 15 months ago
#29248 closed defect (fixed)
Index notation for tensors should allow for unicode characters
Reported by:  egourgoulhon  Owned by:  

Priority:  major  Milestone:  sage9.2 
Component:  geometry  Keywords:  tensor, indices 
Cc:  ghLBrunswic, egourgoulhon, tscrim, ghmjungmath  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 20 months ago by
 Cc ghLBrunswic added
comment:2 Changed 19 months ago by
 Milestone changed from sage9.1 to sage9.2
comment:3 Changed 15 months ago by
 Branch set to u/mkoeppe/index_notation_for_tensors_should_allow_for_unicode_characters
comment:4 Changed 15 months ago by
 Cc egourgoulhon tscrim ghmjungmath added
 Commit set to ab2beb1e59cce64866e15d675fd88108fd8610ad
 Status changed from new to needs_review
New commits:
ab2beb1  sage.tensor.modules.tensor_with_indices: Allow unicode indices (nondigit word constituents)

comment:5 Changed 15 months ago by
 Description modified (diff)
comment:6 Changed 15 months ago by
 Reviewers set to Eric Gourgoulhon
 Status changed from needs_review to positive_review
Thanks for this improvement! LGTM.
comment:7 Changed 15 months ago by
Thanks!
comment:8 Changed 15 months ago by
 Status changed from positive_review to needs_work
pdf docs don't build
comment:9 Changed 15 months ago by
 Commit changed from ab2beb1e59cce64866e15d675fd88108fd8610ad to 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 15 months ago by
 Status changed from needs_work to needs_review
comment:11 Changed 15 months ago by
 Status changed from needs_review to positive_review
Thanks for the fix.
comment:12 Changed 15 months ago by
 Branch changed from u/mkoeppe/index_notation_for_tensors_should_allow_for_unicode_characters to 4d8305faf557774ff67bbb47cd0d76bb06fe71d0
 Resolution set to fixed
 Status changed from positive_review to 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.