Skip to content

Commit

Permalink
makes sure that windows are array before plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
billbrod committed Sep 21, 2023
1 parent c27ba6a commit 87a7dab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pooling/pooling_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ def plot_window_checks(self, angle_n=0, scale=0):
fig, axes = plt.subplots(2, 1, figsize=(5, 10),
gridspec_kw={'hspace': .4})
for i, (f, name) in enumerate(zip(funcs, ['L1-norm', 'Sum'])):
d = f(windows)
d = f(windows).numpy()
# most of the time, self.central_eccentricity_degrees
# and d will be same size, but sometimes they will not
# not. this happens because central_eccentricity_degrees
Expand All @@ -1162,7 +1162,7 @@ def plot_window_checks(self, angle_n=0, scale=0):
# those at the end, because they're off the image
ecc = self.central_eccentricity_degrees[:d.shape[0]]
axes[i].semilogx(ecc, d)
for j, dj in enumerate(d.transpose(0, 1)):
for j, dj in enumerate(d.transpose(1, 0)):
if i == 0:
label = angle_n[j]
else:
Expand Down

0 comments on commit 87a7dab

Please sign in to comment.