From 9adefd1023f88eaa542173ea722b270ee8af9f10 Mon Sep 17 00:00:00 2001 From: yamasaki <114902604+ymski@users.noreply.github.com> Date: Wed, 23 Aug 2023 16:12:57 +0900 Subject: [PATCH] remove numpy dependency Signed-off-by: yamasaki <114902604+ymski@users.noreply.github.com> --- ros2caret/verb/record.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ros2caret/verb/record.py b/ros2caret/verb/record.py index 8d718349..7a1f97c7 100644 --- a/ros2caret/verb/record.py +++ b/ros2caret/verb/record.py @@ -12,14 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +import math import os from typing import Optional from caret_msgs.msg import End, Start, Status -import numpy as np - import rclpy from rclpy import qos from rclpy.node import Node @@ -191,7 +190,7 @@ def main(self, *, args): and args.subbuffer_size_ust != 8*4096: raise ValueError('the --subbuffer-size-ust option is ' 'available in iron or rolling') - if not np.log2(args.subbuffer_size_ust).is_integer(): + if not math.log2(args.subbuffer_size_ust).is_integer(): raise ValueError('--subbuffer-size-ust value must be power of two.') init_args['subbuffer_size_ust'] = args.subbuffer_size_ust @@ -199,7 +198,7 @@ def main(self, *, args): and args.subbuffer_size_kernel != 32*4096: raise ValueError('the --subbuffer-size-kernel option is ' 'available in iron or rolling') - if not np.log2(args.subbuffer_size_kernel).is_integer(): + if not math.log2(args.subbuffer_size_kernel).is_integer(): raise ValueError('--subbuffer-size-kernel value must be power of two.') init_args['subbuffer_size_kernel'] = args.subbuffer_size_kernel init(**init_args)