Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-13232

Python PropertySet.set mis-handles array of bool

    Details

    • Templates:
    • Story Points:
      2
    • Sprint:
      AP S18-6
    • Team:
      Alert Production

      Description

      PropertySet and PropertyList both mis-handle set(name, array-of-bool). The call succeeds, but the item is not correctly saved. Consider the following example:

      from lsst.daf.base import PropertySet, PropertyList
      ps = PropertySet()  # or PropertyList()
      ps.set("A", [False, True])
      ps.get("A")
      # throws *** lsst.pex.exceptions.wrappers.TypeError: Unknown PropertySet value type for A
      ps.set("B", False)
      ps.add("B", True)
      ps.get("B")
      # returns [False, True]
      

      Note that it is possible to set an array of bool using add, so it seems to be something about PropertySet.set.

        Attachments

          Container Issues

            Issue Links

              Activity

                People

                • Assignee:
                  rowen Russell Owen
                  Reporter:
                  rowen Russell Owen
                  Reviewers:
                  Kian-Tat Lim
                  Watchers:
                  Kian-Tat Lim, Russell Owen
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Summary Panel