Opened 2 years ago

Closed 2 years ago

Last modified 23 months ago

#30288 closed enhancement (fixed)

Immutability for Sections

Reported by: Michael Jung Owned by:
Priority: major Milestone: sage-9.2
Component: manifolds Keywords: immutable
Cc: Eric Gourgoulhon, Travis Scrimshaw, Matthias Köppe Merged in:
Authors: Michael Jung Reviewers: Matthias Koeppe
Report Upstream: N/A Work issues:
Branch: 04085f9 (Commits, GitHub, GitLab) Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Michael Jung)

This is the immutability ticket for sections (cf. #30261).

In this ticket we also add most features that have been developed in the last Sage versions and not been adapted to sections yet. This includes:

  • _is_zero attribute
  • unsafe assignments
  • copy_from method

Follow up: #31255

Change History (10)

comment:1 Changed 2 years ago by Michael Jung

Branch: u/gh-mjungmath/immutability_for_sections

comment:2 Changed 2 years ago by Michael Jung

Cc: Eric Gourgoulhon Travis Scrimshaw Matthias Köppe added
Commit: 7a9feb613d60eca7b431b9068dd87d8668dc3b0e
Description: modified (diff)
Keywords: immutable added
Status: newneeds_review

New commits:

286d3c6FreeModuleTensor, Vector: Subclass a new class ModuleElementWithMutability
9df3d22sage.tensor.modules: Make all zero() and one() elements immutable
4373ea2FreeModuleTensor: Replace special casing of the immutable zero by is_immutable
a2ee8beModuleElementWithMutability.is_immutable, is_mutable: Change def to cpdef
c80922bTrac #30288: Merge branch 't/30181/immutable_elements_of_freemoduletensor' into t/30288/immutability_for_sections
7a9feb6Trac #30288: _is_zero attribute added + copy_from added + unsafe assignment added + immutability added

comment:3 Changed 2 years ago by git

Commit: 7a9feb613d60eca7b431b9068dd87d8668dc3b0e04085f93853c301b0f8bfe59a0b831b513e39ed9

Branch pushed to git repo; I updated commit sha1. New commits:

04085f9Trac #30288: missing _is_zero attribute added

comment:4 Changed 2 years ago by Michael Jung

Green patchbot.

comment:5 Changed 2 years ago by Matthias Köppe

This looks fine except for the issue discussed in #30302

comment:6 Changed 2 years ago by Michael Jung

Still, this reflects the current state. I'd like to have it in because of unification. The copy modifications discussed in #30302 can then still be built upon this ticket.

comment:7 Changed 2 years ago by Matthias Köppe

Reviewers: Matthias Koeppe
Status: needs_reviewpositive_review

comment:8 Changed 2 years ago by Michael Jung

Thanks! :)

comment:9 Changed 2 years ago by Volker Braun

Branch: u/gh-mjungmath/immutability_for_sections04085f93853c301b0f8bfe59a0b831b513e39ed9
Resolution: fixed
Status: positive_reviewclosed

comment:10 Changed 23 months ago by Michael Jung

Commit: 04085f93853c301b0f8bfe59a0b831b513e39ed9
Description: modified (diff)
Note: See TracTickets for help on using tickets.