Skip to content

Commit

Permalink
disable transpose function if the output is a scalar
Browse files Browse the repository at this point in the history
  • Loading branch information
bobcheng15 committed Dec 13, 2024
1 parent a853929 commit 193246e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aha/util/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ def dispatch(args, extra_args=None):
rearrng_axis = []
for reorder_tup in output_mode_map:
rearrng_axis.append(reorder_tup[0])
sim_matrix = numpy.transpose(sim_matrix, rearrng_axis)
is_scalar = (rearrng_axis == [])
if not is_scalar:
sim_matrix = numpy.transpose(sim_matrix, rearrng_axis)

# Set up numpy so it doesn't print in scientific notation
numpy.set_printoptions(suppress=True)
Expand Down

0 comments on commit 193246e

Please sign in to comment.