Skip to content

Array type inference issue for mixed magnet classes #384

Description

@gupichon
  1. magnets[:] and magnets["QD"] works but return ElementArray instead of MagnetArray
type(sr.design.magnets[":"])
>>> pyaml.arrays.element_array.ElementArray
  1. Similar bug with using subset of magnet arrays
magnets.get()        -> MagnetArray     ✅
magnets.get()[:]     -> ElementArray    ❌ should be MagnetArray
magnets.get()['S*']  -> ElementArray    ❌ should be MagnetArray

Originally posted by @GamelinAl in #376 (comment)

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions