Skip to content

cyclic: different sets for Field.domain & corresponding Field #762

Closed

Description

@sadielbartholomew

During work towards a fix for #758 I have noticed that the set returned from cyclic() for a Domain is, at least in some cases such as the example below (namely example field no. 2), not the same as the set for the corresponding Field i.e. <a Field>.domain.cyclic() and <a Field>.cyclic() are not equal in terms of size as well as named keys. However, they should be the same, at least with respect to the number of axes present regardless of keyed names, because axes of a Field's domain are, by contextual definition, the same as the axes of that Field.

Concrete example

>>> f = cf.example_field(2)
>>> f.cyclic()
{'domainaxis2'}
>>> d = f.domain
>>> d.cyclic()
set()

Activity

  1. changed the title [-]`cyclic` method: different for `Field.domain` & the corresponding `Field`[/-] [+]`cyclic` method: different for `Field.domain` & corresponding `Field`[/+] on Apr 22, 2024
  2. changed the title [-]`cyclic` method: different for `Field.domain` & corresponding `Field`[/-] [+]`cyclic`: different outputs for `Field.domain` & corresponding `Field`[/+] on Apr 22, 2024
  3. changed the title [-]`cyclic`: different outputs for `Field.domain` & corresponding `Field`[/-] [+]`cyclic`: different sets for `Field.domain` & corresponding `Field`[/+] on Apr 22, 2024
  4. sadielbartholomew commented on Apr 22, 2024

    @sadielbartholomew
    MemberAuthor

    (Just trying to find a good Issue name which fits into one line only as a PR header... 🙂 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions