Skip to content
GitLab
Projects Groups Snippets
  • /
  • 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 16
    • Issues 16
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and 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
  • #337
Closed
Open
Issue created Sep 23, 2021 by Philipp Frank@pfrankMaintainer

Possible error in assert_equal and assert_allclose for MultiFields

In their current form, both methods assert_equal and assert_allclose only perform a one sided test for MultiFields. This leads to some unexpected behaviour when comparing two Fields which are only equal one some sub-domain. In particular the following test

import nifty8 as ift
d = ift.RGSpace(10)
d = ift.MultiDomain.make({'a' : d, 'b' : d})
f = ift.from_random(d)
fp = f.extract_by_keys(['a',])
ift.extra.assert_equal(fp, f)

will pass, but

ift.extra.assert_equal(f, fp)

produces an error, as only the keys of the first input are looped over. The same goes for assert_allclose.

This does not look like an intended behaviour to me. @mtr, @parras, am I missing something here?

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