From 859c23b6ea719b77d2ca8a9e453644726576df88 Mon Sep 17 00:00:00 2001 From: Jeremy Kubica <104161096+jeremykubica@users.noreply.github.com> Date: Tue, 26 Sep 2023 11:41:53 -0400 Subject: [PATCH] Fix deprecation warning --- src/kbmod/file_utils.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/kbmod/file_utils.py b/src/kbmod/file_utils.py index 5e0df4fb3..67fe390ec 100644 --- a/src/kbmod/file_utils.py +++ b/src/kbmod/file_utils.py @@ -221,13 +221,13 @@ def trajectory_from_np_object(result): The corresponding trajectory object. """ trj = kb.Trajectory() - trj.x = int(result["x"]) - trj.y = int(result["y"]) - trj.vx = float(result["vx"]) - trj.vy = float(result["vy"]) - trj.flux = float(result["flux"]) - trj.lh = float(result["lh"]) - trj.obs_count = int(result["num_obs"]) + trj.x = int(result["x"][0]) + trj.y = int(result["y"][0]) + trj.vx = float(result["vx"][0]) + trj.vy = float(result["vy"][0]) + trj.flux = float(result["flux"][0]) + trj.lh = float(result["lh"][0]) + trj.obs_count = int(result["num_obs"][0]) return trj @staticmethod