Skip to content

Commit 5a1a78f

Browse files
committed
Demo notebook
1 parent f15c446 commit 5a1a78f

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

add-random-dash.ipynb

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "746026fa-e903-43e6-af4c-847f54cbe96c",
7+
"metadata": {},
8+
"outputs": [],
9+
"source": [
10+
"import cubed\n",
11+
"import cubed.array_api as xp\n",
12+
"import cubed.random\n",
13+
"from cubed.diagnostics.dash import Dashboard"
14+
]
15+
},
16+
{
17+
"cell_type": "code",
18+
"execution_count": null,
19+
"id": "d43ee666-6c50-461c-8723-e2def4bc04fe",
20+
"metadata": {},
21+
"outputs": [],
22+
"source": [
23+
"a = cubed.random.random((25000, 25000), chunks=(5000, 5000))\n",
24+
"b = cubed.random.random((25000, 25000), chunks=(5000, 5000))\n",
25+
"c = xp.add(a, b)"
26+
]
27+
},
28+
{
29+
"cell_type": "code",
30+
"execution_count": null,
31+
"id": "0d130e71-d4fa-454e-b508-ccc6f7179ecb",
32+
"metadata": {},
33+
"outputs": [],
34+
"source": [
35+
"with Dashboard(debug=True):\n",
36+
" cubed.to_zarr(c, store=None, optimize_graph=False)"
37+
]
38+
},
39+
{
40+
"cell_type": "code",
41+
"execution_count": null,
42+
"id": "2d8de071-1d68-4a7f-9ea0-c0c748f5e274",
43+
"metadata": {},
44+
"outputs": [],
45+
"source": []
46+
}
47+
],
48+
"metadata": {
49+
"kernelspec": {
50+
"display_name": "Python 3 (ipykernel)",
51+
"language": "python",
52+
"name": "python3"
53+
},
54+
"language_info": {
55+
"codemirror_mode": {
56+
"name": "ipython",
57+
"version": 3
58+
},
59+
"file_extension": ".py",
60+
"mimetype": "text/x-python",
61+
"name": "python",
62+
"nbconvert_exporter": "python",
63+
"pygments_lexer": "ipython3",
64+
"version": "3.12.11"
65+
}
66+
},
67+
"nbformat": 4,
68+
"nbformat_minor": 5
69+
}

0 commit comments

Comments
 (0)