Skip to content

Commit

Permalink
attribute and argument fixes (#80)
Browse files Browse the repository at this point in the history
Co-authored-by: Arina Danilina <danilina@cip.ifi.lmu.de>
  • Loading branch information
ArinaDanilina and Arina Danilina authored Jul 2, 2024
1 parent 507f24c commit 5b9d4e0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 22 deletions.
5 changes: 3 additions & 2 deletions examples/problems/1100_callback.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@
"df_graph = pd.DataFrame(\n",
" index=adata_concat.obs_names,\n",
" columns=adata_concat.obs_names,\n",
" data=adata_concat.obsp[\"connectivities\"].A.astype(\"float64\"),\n",
" data=adata_concat.obsp[\"connectivities\"].toarray().astype(\"float64\"),\n",
")"
]
},
Expand Down Expand Up @@ -505,7 +505,8 @@
" normalize_spatial=False,\n",
" xy_callback=lambda term, src, tgt: TaggedArray(\n",
" *np.split(\n",
" SparsePCA().fit_transform(np.vstack([src.X.A, tgt.X.A])), [src.shape[0]]\n",
" SparsePCA().fit_transform(np.vstack([src.X.toarray(), tgt.X.toarray()])),\n",
" [src.shape[0]],\n",
" )\n",
" ),\n",
")"
Expand Down
10 changes: 5 additions & 5 deletions examples/problems/900_annotation_mapping.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
],
"source": [
"mp = mp.prepare(\n",
" sc_attr={\"attr\": \"obsm\", \"key\": \"X_pca\"}, **{\"xy_callback\": \"local-pca\"}\n",
" sc_attr={\"attr\": \"obsm\", \"key\": \"X_pca\"}, xy_callback=\"local-pca\"\n",
").solve()"
]
},
Expand Down Expand Up @@ -301,7 +301,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 12,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -339,7 +339,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 13,
"metadata": {},
"outputs": [
{
Expand All @@ -366,7 +366,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 14,
"metadata": {},
"outputs": [
{
Expand All @@ -375,7 +375,7 @@
"0.8644290885159592"
]
},
"execution_count": 20,
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
Expand Down
28 changes: 13 additions & 15 deletions tutorials/400_spatial_mapping.ipynb

Large diffs are not rendered by default.

0 comments on commit 5b9d4e0

Please sign in to comment.