Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indexing NTTables fails for numpy integers #1119

Open
slactjohnson opened this issue Oct 16, 2024 · 0 comments · May be fixed by #1120
Open

Indexing NTTables fails for numpy integers #1119

slactjohnson opened this issue Oct 16, 2024 · 0 comments · May be fixed by #1120

Comments

@slactjohnson
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant