cnpem / cnpem/sophys-common

Fix convertion of array to int for newer numpy versions

Open Beginner friendly
#103 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5
Forks
3
Avg merge
1d 22h
Merged PRs (30d)
3

Description

At:
https://github.com/cnpem/sophys-common/blob/24947487127bef23045b2f41a2fee1e3214ac6b1/src/sophys/common/devices/eras.py#L29
This implicitly converts the get response which is np.array([3]) to 3, with int(np.array...), this was deprecated after numpy 1.25

Contributor guide

No contributing guide indexed for this repository

Research direction

Open src/sophys/common/devices/eras.py at line 29 and inspect how the np.array([3]) response is converted to an integer. Check the behavior with newer NumPy versions, then verify that the conversion no longer triggers the deprecation while preserving the resulting integer value.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
85/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.