Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • N NIFTy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 18
    • Issues 18
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ift
  • NIFTy
  • Issues
  • #221

Closed
Open
Created Feb 15, 2018 by Christoph Lienhard@clienhar

DiagonalOperator diagonal() function as property?

The DiagonalOperator class has a function diagonal() returning the respective Field.

IMHO this should be a property, since e.g.

diagonal_val = operator.diagonal().val

just looks stupid (from a purely designy pythonic point of view).

The main philosophy I propose in this case is that from a class point of view 'diagonal' to DiagonalOperator is the same as 'val' to Field.

Following this the getter of the proposed property 'diagonal' should not return a copy of the diagonal (in contrast to what the current function diagonal() returns) since the property 'val' of Field does not do this either.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking