Skip to content

Instantly share code, notes, and snippets.

@willirath
Forked from benbovy/ball_tree_xr_accessor.ipynb
Last active June 25, 2020 16:44
Show Gist options
  • Save willirath/e0380c02da41568eb91bfaf509faefff to your computer and use it in GitHub Desktop.
Save willirath/e0380c02da41568eb91bfaf509faefff to your computer and use it in GitHub Desktop.
Ball Tree Xarray Index
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import papermill"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"!mkdir -p pm_output/"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'array_lib': 'numpy',\n",
" 'data_2d_size': [100, 100],\n",
" 'data_1d_size': 10000,\n",
" 'indexer_1d_size': 50,\n",
" 'indexer_2d_size': [20, 80]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9742bc23ec084954b25218073152d32a",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'numpy',\n",
" 'data_2d_size': [100, 100],\n",
" 'data_1d_size': 10000,\n",
" 'indexer_1d_size': 50,\n",
" 'indexer_2d_size': [100, 500]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f4119e136e064f129ae5edc91a256f4d",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'numpy',\n",
" 'data_2d_size': [100, 100],\n",
" 'data_1d_size': 10000,\n",
" 'indexer_1d_size': 10000,\n",
" 'indexer_2d_size': [20, 80]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "a36d9b93e43b47afb4673f9ab1005c8e",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'numpy',\n",
" 'data_2d_size': [100, 100],\n",
" 'data_1d_size': 10000,\n",
" 'indexer_1d_size': 10000,\n",
" 'indexer_2d_size': [100, 500]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "81be585afb58466a86abffbf67fe670e",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'numpy',\n",
" 'data_2d_size': [100, 100],\n",
" 'data_1d_size': 1000000,\n",
" 'indexer_1d_size': 50,\n",
" 'indexer_2d_size': [20, 80]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "8f08a23b2f8f4e40a68712b4c37d5045",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'numpy',\n",
" 'data_2d_size': [100, 100],\n",
" 'data_1d_size': 1000000,\n",
" 'indexer_1d_size': 50,\n",
" 'indexer_2d_size': [100, 500]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "10c6de2590fd4c0e93ccd471662b7a2b",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'numpy',\n",
" 'data_2d_size': [100, 100],\n",
" 'data_1d_size': 1000000,\n",
" 'indexer_1d_size': 10000,\n",
" 'indexer_2d_size': [20, 80]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "8f29bbf1272e45c0a3ce3236f1521a36",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'numpy',\n",
" 'data_2d_size': [100, 100],\n",
" 'data_1d_size': 1000000,\n",
" 'indexer_1d_size': 10000,\n",
" 'indexer_2d_size': [100, 500]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "cc48c8524663446789e90ee068a1cbba",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'numpy',\n",
" 'data_2d_size': [1000, 1000],\n",
" 'data_1d_size': 10000,\n",
" 'indexer_1d_size': 50,\n",
" 'indexer_2d_size': [20, 80]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f547cdf2f90843e484a266525da1c00d",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'numpy',\n",
" 'data_2d_size': [1000, 1000],\n",
" 'data_1d_size': 10000,\n",
" 'indexer_1d_size': 50,\n",
" 'indexer_2d_size': [100, 500]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "2c0944fd83d64c839d2591eded1a766e",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'numpy',\n",
" 'data_2d_size': [1000, 1000],\n",
" 'data_1d_size': 10000,\n",
" 'indexer_1d_size': 10000,\n",
" 'indexer_2d_size': [20, 80]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "6f16354c26e94502b76ab4b87230b638",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'numpy',\n",
" 'data_2d_size': [1000, 1000],\n",
" 'data_1d_size': 10000,\n",
" 'indexer_1d_size': 10000,\n",
" 'indexer_2d_size': [100, 500]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "6b3bbcda8bd34677bb7c9b2282b99ab1",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'numpy',\n",
" 'data_2d_size': [1000, 1000],\n",
" 'data_1d_size': 1000000,\n",
" 'indexer_1d_size': 50,\n",
" 'indexer_2d_size': [20, 80]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "e915a24c53664cabad1aa5e447a2ac1e",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'numpy',\n",
" 'data_2d_size': [1000, 1000],\n",
" 'data_1d_size': 1000000,\n",
" 'indexer_1d_size': 50,\n",
" 'indexer_2d_size': [100, 500]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "fc4a961a514c45758f81f22a66e34789",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'numpy',\n",
" 'data_2d_size': [1000, 1000],\n",
" 'data_1d_size': 1000000,\n",
" 'indexer_1d_size': 10000,\n",
" 'indexer_2d_size': [20, 80]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "34200cae60a84a6aacb0b2e3cdcbaabd",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'numpy',\n",
" 'data_2d_size': [1000, 1000],\n",
" 'data_1d_size': 1000000,\n",
" 'indexer_1d_size': 10000,\n",
" 'indexer_2d_size': [100, 500]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "2441409ce24f4f23820f1648ab6a871e",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'dask',\n",
" 'data_2d_size': [100, 100],\n",
" 'data_1d_size': 10000,\n",
" 'indexer_1d_size': 50,\n",
" 'indexer_2d_size': [20, 80]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c7e16a954c6d4e779bd3e615a7883a65",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'dask',\n",
" 'data_2d_size': [100, 100],\n",
" 'data_1d_size': 10000,\n",
" 'indexer_1d_size': 50,\n",
" 'indexer_2d_size': [100, 500]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "07ece6ad3eeb44ce882f242e1b582bbb",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'dask',\n",
" 'data_2d_size': [100, 100],\n",
" 'data_1d_size': 10000,\n",
" 'indexer_1d_size': 10000,\n",
" 'indexer_2d_size': [20, 80]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "a04315d980b04d56ae93dae67d4d842b",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'dask',\n",
" 'data_2d_size': [100, 100],\n",
" 'data_1d_size': 10000,\n",
" 'indexer_1d_size': 10000,\n",
" 'indexer_2d_size': [100, 500]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "4500431c16134a2583e17005f637d983",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'dask',\n",
" 'data_2d_size': [100, 100],\n",
" 'data_1d_size': 1000000,\n",
" 'indexer_1d_size': 50,\n",
" 'indexer_2d_size': [20, 80]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "dbb5c95188684778b7cf7846ceb368ac",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'dask',\n",
" 'data_2d_size': [100, 100],\n",
" 'data_1d_size': 1000000,\n",
" 'indexer_1d_size': 50,\n",
" 'indexer_2d_size': [100, 500]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c783b275e2984962bf33fe0a7a24fdfd",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'dask',\n",
" 'data_2d_size': [100, 100],\n",
" 'data_1d_size': 1000000,\n",
" 'indexer_1d_size': 10000,\n",
" 'indexer_2d_size': [20, 80]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "ec3d99a89fb149c89a68040084a44b51",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'dask',\n",
" 'data_2d_size': [100, 100],\n",
" 'data_1d_size': 1000000,\n",
" 'indexer_1d_size': 10000,\n",
" 'indexer_2d_size': [100, 500]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "3ac243add76d4b3ea541fb40577f2fa5",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'dask',\n",
" 'data_2d_size': [1000, 1000],\n",
" 'data_1d_size': 10000,\n",
" 'indexer_1d_size': 50,\n",
" 'indexer_2d_size': [20, 80]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "d79be31ebd444459806c0e601ad9c674",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'dask',\n",
" 'data_2d_size': [1000, 1000],\n",
" 'data_1d_size': 10000,\n",
" 'indexer_1d_size': 50,\n",
" 'indexer_2d_size': [100, 500]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "7423b36050a94f56b160bdf53106af47",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'dask',\n",
" 'data_2d_size': [1000, 1000],\n",
" 'data_1d_size': 10000,\n",
" 'indexer_1d_size': 10000,\n",
" 'indexer_2d_size': [20, 80]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "2d2280b90123444cb28a33b0f20f4627",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'dask',\n",
" 'data_2d_size': [1000, 1000],\n",
" 'data_1d_size': 10000,\n",
" 'indexer_1d_size': 10000,\n",
" 'indexer_2d_size': [100, 500]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "58925f6047ae422292e116961fc219df",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'dask',\n",
" 'data_2d_size': [1000, 1000],\n",
" 'data_1d_size': 1000000,\n",
" 'indexer_1d_size': 50,\n",
" 'indexer_2d_size': [20, 80]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "7ad1b581c88d4a64b47a6a88a98c5bfe",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'dask',\n",
" 'data_2d_size': [1000, 1000],\n",
" 'data_1d_size': 1000000,\n",
" 'indexer_1d_size': 50,\n",
" 'indexer_2d_size': [100, 500]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "e776e4b8db144c9d95880c0d2c97d43c",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'dask',\n",
" 'data_2d_size': [1000, 1000],\n",
" 'data_1d_size': 1000000,\n",
" 'indexer_1d_size': 10000,\n",
" 'indexer_2d_size': [20, 80]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "e033979165454f27a9c339444edd5fba",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
},
{
"data": {
"text/plain": [
"{'array_lib': 'dask',\n",
" 'data_2d_size': [1000, 1000],\n",
" 'data_1d_size': 1000000,\n",
" 'indexer_1d_size': 10000,\n",
" 'indexer_2d_size': [100, 500]}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "6e08f314e6e54dc3b5bf855186ab5d64",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='Executing', max=23.0, style=ProgressStyle(description_wid…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
}
],
"source": [
"parameters = [\n",
" {\n",
" \"array_lib\": array_lib,\n",
" \"data_2d_size\": data_2d_size,\n",
" \"data_1d_size\": data_1d_size,\n",
" \"indexer_1d_size\": indexer_1d_size,\n",
" \"indexer_2d_size\": indexer_2d_size,\n",
" }\n",
" for array_lib in [\"numpy\", \"dask\"]\n",
" for data_2d_size in [[100, 100], [1_000, 1_000]]\n",
" for data_1d_size in [10_000, 1_000_000]\n",
" for indexer_1d_size in [50, 10_000]\n",
" for indexer_2d_size in [[20, 80], [100, 500]]\n",
"]\n",
"\n",
"for npar, param in enumerate(parameters):\n",
" display(param)\n",
" nb = papermill.execute_notebook(\n",
" \"ball_tree_xr_accessor.ipynb\",\n",
" output_path=f\"pm_output/p{npar}_ball_tree_xr_accessor.ipynb\",\n",
" parameters=param,\n",
" nest_asyncio=True\n",
" )"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment