Skip to content

Commit

Permalink
numpy copy issue in regression 1
Browse files Browse the repository at this point in the history
  • Loading branch information
janursa committed Aug 11, 2024
1 parent ba24f2e commit 008daf5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.DS_Store

# related to files
params*
resources*
output/
out/
Expand Down
14 changes: 11 additions & 3 deletions src/metrics/regression_1/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,22 @@
# print(output)
# output.to_csv(par['score'])

print(output.values.shape, output.columns.to_numpy().shape)

metric_ids = output.columns.to_numpy().reshape(1, -1)
metric_values = output.values
# if metric_ids.ndim == 1:
# metric_ids = metric_ids.reshape(1, -1)
# if metric_values.ndim == 1:
# metric_values = metric_values.reshape(1, -1)

print(metric_ids.shape, metric_values.shape)
output = ad.AnnData(
X=np.empty((0, 0)),
uns={
"dataset_id": par["layer"],
"method_id": f"reg1-{par['method_id']}",
"metric_ids": output.columns.to_numpy(),
"metric_values": output.values[0]
"metric_ids": metric_ids,
"metric_values": metric_values
}
)

Expand Down

0 comments on commit 008daf5

Please sign in to comment.