Skip to content

Commit

Permalink
Bugfix: needed to transpose matrix before JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
baraaorabi committed May 13, 2024
1 parent b1d21b3 commit 5922168
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py/truncate_kde.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def parse_args():
"--output",
type=str,
required=True,
help="Path prefix for the output files: <>.X_idxs.npy, <>.Y_idxs.npy, <>.grid.npy, <>.sider.tsv",
help="Path prefix for the output JSON model (e.g. sample.json).",
)
parser.add_argument(
"-b",
Expand Down Expand Up @@ -300,7 +300,7 @@ def printModelJson(grid, x_labels, y_labels, end_ratios, args, sep=","):
grid_mtx = SerialMTX(
"KDE_mtx",
list(grid.shape),
list(grid.flatten()),
list(grid.T.flatten()),
[int(a) for a in list(x_labels[1:]) + list(y_labels[1:])],
)

Expand Down

0 comments on commit 5922168

Please sign in to comment.