-
Type:
Task
-
Status: Open (View Workflow)
-
Priority:
Normal
-
Resolution: Unresolved
-
Component/s: ics_cobraCharmer
-
Labels:None
The PFI class variables COBRA_XXX_MASK are set to 0x0001, etc. That fails in status &= ~self.COBRA_OK_MASK because the non-numpy ~0x0001 is turned into a negative integer after which numpy 2 rejects the operation against the `np.uint16` `status`:
----> 1 ~0x0001 & np.uint16(0) OverflowError: Python integer -2 out of bounds for uint16
Either all the constants should be set to np.uint16(0x0001, etc, or the negation in setCobraStatus() needs to be protected. The cowardly way out is just to fix that specific usage, but I suspect we should type the constants. Am a bit worried about all possible downstream users....
Or hide all such constants and wrap with accessors?