Skip to content

Commit

Permalink
Fixed improper invocation of np.zeros()
Browse files Browse the repository at this point in the history
  • Loading branch information
RemingtonRohel committed Oct 9, 2024
1 parent 851f173 commit 523547f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pydarn/plotting/rtp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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\
Expand All @@ -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']:
Expand Down Expand Up @@ -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\
Expand All @@ -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']:
Expand Down

0 comments on commit 523547f

Please sign in to comment.