From ba713dede4178b8d4981482e6c71dbb4dc688b3e Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Fri, 20 Oct 2023 09:38:50 -0400 Subject: [PATCH 1/2] np.math is deprecated call to math --- neo/rawio/blackrockrawio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neo/rawio/blackrockrawio.py b/neo/rawio/blackrockrawio.py index d0b6b2d77..5602e3e99 100644 --- a/neo/rawio/blackrockrawio.py +++ b/neo/rawio/blackrockrawio.py @@ -646,7 +646,7 @@ def _get_timestamp_slice(self, timestamp, seg_index, t_start, t_stop): if t_start is None: ind_start = None else: - ts = np.math.ceil(t_start * self.__nev_basic_header['timestamp_resolution']) + ts = int(np.ceil(t_start * self.__nev_basic_header['timestamp_resolution'])) ind_start = np.searchsorted(timestamp, ts) if t_stop is None: From c1894a5c0853705b98497babdd6071c1ce404a7f Mon Sep 17 00:00:00 2001 From: Zach McKenzie <92116279+zm711@users.noreply.github.com> Date: Sat, 9 Dec 2023 09:33:14 -0500 Subject: [PATCH 2/2] use math.ceil --- neo/rawio/blackrockrawio.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neo/rawio/blackrockrawio.py b/neo/rawio/blackrockrawio.py index 5602e3e99..1fc01ae91 100644 --- a/neo/rawio/blackrockrawio.py +++ b/neo/rawio/blackrockrawio.py @@ -61,6 +61,7 @@ import os import re import warnings +import math import numpy as np import quantities as pq @@ -646,7 +647,7 @@ def _get_timestamp_slice(self, timestamp, seg_index, t_start, t_stop): if t_start is None: ind_start = None else: - ts = int(np.ceil(t_start * self.__nev_basic_header['timestamp_resolution'])) + ts = math.ceil(t_start * self.__nev_basic_header['timestamp_resolution']) ind_start = np.searchsorted(timestamp, ts) if t_stop is None: