pydm icon indicating copy to clipboard operation
pydm copied to clipboard

Indexing NTTables fails for numpy integers

Open slactjohnson opened this issue 1 year ago • 0 comments

Describe the bug

When indexing a Numpy integer from an NTTable array, the value type numpy.int32 is not accepted by the P4P plugin.

image

Expected behavior

PyDM would ideally accept Numpy types.

Steps to Reproduce

Example NTTable: image

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

slactjohnson avatar Oct 16 '24 18:10 slactjohnson