pydm
pydm copied to clipboard
Indexing NTTables fails for numpy integers
Describe the bug
When indexing a Numpy integer from an NTTable array, the value type numpy.int32 is not accepted by the P4P plugin.
Expected behavior
PyDM would ideally accept Numpy types.
Steps to Reproduce
Example NTTable:
Try indexing out one of the rates with e.g. pva://DAQ:NEH:XPM:0:SEQCODES/Rate/1
Possible Solution
Add an additional case to the code where the value is checked:
elif isinstance(new_value, np.integer):
self.new_value_signal[int].emit(int(new_value))
My Platform
OS: RHEL7 Python: 3.9.19 PyDM: 1.24.1
Additional context