From 523547fbbd600a1238b8ef9768622f9a48d1942f Mon Sep 17 00:00:00 2001 From: Remington Rohel Date: Wed, 9 Oct 2024 13:16:20 -0600 Subject: [PATCH] Fixed improper invocation of np.zeros() --- pydarn/plotting/rtp.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pydarn/plotting/rtp.py b/pydarn/plotting/rtp.py index 0b7ab5eb..7aaa214b 100644 --- a/pydarn/plotting/rtp.py +++ b/pydarn/plotting/rtp.py @@ -324,7 +324,7 @@ def plot_range_time(cls, dmap_data: List[dict], parameter: str = 'v', x.append(x[-1] + timedelta(0, 120)) i = len(x) - 1 # offset since we start at 0 not 1 if i > 0: - z = np.insert(z, len(z), np.zeros(1, y_max) * np.nan, + z = np.insert(z, len(z), np.zeros([1, y_max]) * np.nan, axis=0) # Get data for the provided beam number if (beam_num == 'all' or dmap_record['bmnum'] == beam_num) and\ @@ -341,7 +341,7 @@ def plot_range_time(cls, dmap_data: List[dict], parameter: str = 'v', # insert a new column into the z_data if i > 0: - z = np.insert(z, len(z), np.zeros(1, y_max) * np.nan, + z = np.insert(z, len(z), np.zeros([1, y_max]) * np.nan, axis=0) try: if len(dmap_record[parameter]) == dmap_record['nrang']: @@ -1709,7 +1709,7 @@ def plot_coord_time(cls, dmap_data: List[dict], parameter: str = 'v', x.append(x[-1] + timedelta(0, 120)) i = len(x) - 1 # offset since we start at 0 not 1 if i > 0: - z = np.insert(z, len(z), np.zeros(1, y_max) * np.nan, + z = np.insert(z, len(z), np.zeros([1, y_max]) * np.nan, axis=0) # Get data for the provided beam number if (beam_num == 'all' or dmap_record['bmnum'] == beam_num) and\ @@ -1726,7 +1726,7 @@ def plot_coord_time(cls, dmap_data: List[dict], parameter: str = 'v', # insert a new column into the z_data if i > 0: - z = np.insert(z, len(z), np.zeros(1, y_max) * np.nan, + z = np.insert(z, len(z), np.zeros([1, y_max]) * np.nan, axis=0) try: if len(dmap_record[parameter]) == dmap_record['nrang']: