#30274 closed enhancement (fixed)
Immutability of Tensor Fields
Reported by:  ghmjungmath  Owned by:  

Priority:  major  Milestone:  sage9.2 
Component:  manifolds  Keywords:  immutability 
Cc:  egourgoulhon, tscrim, mkoeppe  Merged in:  
Authors:  Michael Jung  Reviewers:  Matthias Koeppe 
Report Upstream:  N/A  Work issues:  
Branch:  1b599b2 (Commits, GitHub, GitLab)  Commit:  
Dependencies:  #30181  Stopgaps: 
Description (last modified by )
Change History (14)
comment:1 Changed 22 months ago by
 Cc egourgoulhon tscrim mkoeppe added
 Component changed from PLEASE CHANGE to manifolds
 Description modified (diff)
 Keywords immutability added
 Type changed from PLEASE CHANGE to enhancement
comment:2 Changed 22 months ago by
 Branch set to u/ghmjungmath/immutability_of_tensor_fields
comment:3 Changed 22 months ago by
 Commit set to 0ba933a0b0aa4734e979f0e22b6d458790ff0d49
 Status changed from new to needs_review
comment:4 Changed 22 months ago by
comment:5 Changed 22 months ago by
Let's wait for the patchbot.
I had to make some modifications for automorphism fields. My doctests all passed.
comment:6 Changed 22 months ago by
 Dependencies set to #30181
comment:7 Changed 22 months ago by
 Description modified (diff)
comment:8 Changed 22 months ago by
 Commit changed from 0ba933a0b0aa4734e979f0e22b6d458790ff0d49 to 1b599b2871b327dfe64acb355d0fbae135f0ca97
Branch pushed to git repo; I updated commit sha1. New commits:
1b599b2  Trac #30274: patchbot complaints fixed

comment:9 Changed 22 months ago by
 Reviewers set to Matthias Koeppe
 Status changed from needs_review to positive_review
LGTM.
comment:10 followup: ↓ 11 Changed 22 months ago by
A quick remark: You define a copy
method here (and looking through sage.manifolds
I see several copy
methods). You may want to consider (on a separate ticket) to provide __copy__
methods as well.
comment:11 in reply to: ↑ 10 Changed 22 months ago by
Thank you for the review.
Replying to mkoeppe:
A quick remark: You define a
copy
method here (and looking throughsage.manifolds
I see severalcopy
methods). You may want to consider (on a separate ticket) to provide__copy__
methods as well.
What is the difference, or what is the advantage?
comment:12 Changed 22 months ago by
comment:13 Changed 22 months ago by
 Branch changed from u/ghmjungmath/immutability_of_tensor_fields to 1b599b2871b327dfe64acb355d0fbae135f0ca97
 Resolution set to fixed
 Status changed from positive_review to closed
comment:14 Changed 16 months ago by
 Commit 1b599b2871b327dfe64acb355d0fbae135f0ca97 deleted
 Description modified (diff)
New commits:
FreeModuleTensor, Vector: Subclass a new class ModuleElementWithMutability
sage.tensor.modules: Make all zero() and one() elements immutable
FreeModuleTensor: Replace special casing of the immutable zero by is_immutable
ModuleElementWithMutability.is_immutable, is_mutable: Change def to cpdef
Trac #30274: Merge branch 't/30181/immutable_elements_of_freemoduletensor' into t/30274/immutability_of_tensor_fields
Trac #30274: first trial of immutability