From ee5f2f7e2c077c051688592020fca19f4c2ea664 Mon Sep 17 00:00:00 2001 From: Alexander James Date: Thu, 23 May 2024 14:12:25 -0700 Subject: [PATCH] include np.squeeze in series init --- pyleoclim/core/series.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyleoclim/core/series.py b/pyleoclim/core/series.py index a8958ad0..e5a3c13d 100644 --- a/pyleoclim/core/series.py +++ b/pyleoclim/core/series.py @@ -153,6 +153,12 @@ def __init__(self, time, value, time_unit=None, time_name=None, time = np.array(time) value = np.array(value) + # ensure 1D arrays + if len(time) > 1: + time = np.squeeze(time) + if len(value) > 1: + value = np.squeeze(value) + if auto_time_params is None: auto_time_params = True if verbose: