Skip to content

GitLab

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

Closed
Open
Opened Feb 15, 2018 by Christoph Lienhard@clienhar
  • Report abuse
  • New issue
Report abuse New issue

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.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ift/nifty#221