Skip to content

Commit

Permalink
Merge pull request #548 from LinkedEarth/squeeze
Browse files Browse the repository at this point in the history
include np.squeeze in series init
  • Loading branch information
CommonClimate authored May 23, 2024
2 parents 6e518cc + ee5f2f7 commit a0660aa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pyleoclim/core/series.py
Original file line number Diff line number Diff line change
@@ -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:

0 comments on commit a0660aa

Please sign in to comment.