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

Replace Deprecated np.float with np.float64 in nd2reader #70

Merged
merged 2 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nd2reader/raw_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,9 @@ def _parse_roi(self, raw_roi_dict):
roi_dict = self._parse_vect_anim(roi_dict, raw_roi_dict[six.b('m_vectAnimParams_%d' % i)])

# convert to NumPy arrays
roi_dict["timepoints"] = np.array(roi_dict["timepoints"], dtype=np.float)
roi_dict["positions"] = np.array(roi_dict["positions"], dtype=np.float)
roi_dict["sizes"] = np.array(roi_dict["sizes"], dtype=np.float)
roi_dict["timepoints"] = np.array(roi_dict["timepoints"], dtype=np.float64)
roi_dict["positions"] = np.array(roi_dict["positions"], dtype=np.float64)
roi_dict["sizes"] = np.array(roi_dict["sizes"], dtype=np.float64)

return roi_dict

Expand Down
2 changes: 1 addition & 1 deletion nd2reader/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def get_timesteps(self):
return self._timesteps

self._timesteps = (
np.array(list(self._parser._raw_metadata.acquisition_times), dtype=np.float)
np.array(list(self._parser._raw_metadata.acquisition_times), dtype=np.float64)
* 1000.0
)

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy>=1.14
numpy>=1.20
six>=1.4
xmltodict>=0.9.2
pims>=0.3.0
Loading