Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
gammalearn gammalearn
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 26
    • Issues 26
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GammaLearn
  • gammalearngammalearn
  • Issues
  • #91

Closed
Open
Created Jun 02, 2022 by Vuillaume@vuillaumeOwner

try/except necessary?

Comment from Max:

https://gitlab.in2p3.fr/gammalearn/gammalearn/-/blob/master/gammalearn/criterions.py#L45

Writing:

try:
    assert alt1.data.nelement() > 0
except AssertError:
    log.exception()
    raise

Is a very weird way of doing: `` if alt.data.nelement() == 0: raise ValueError()


Do you do this because the assertion can be switched off by passing the optimization option for python?
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking