Skip to content

Commit

Permalink
split timeit (timeout on rtd)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathause committed Apr 6, 2020
1 parent 62f0916 commit 8141bec
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions docs/notebooks/method.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -424,22 +424,38 @@
"source": [
"ds_GLOB = regionmask.core.utils.create_lon_lat_dataarray_from_bounds(*(-180, 181, 2), *(90, -91, -2))\n",
"\n",
"countries_110 = regionmask.defined_regions.natural_earth.countries_110\n",
"\n",
"countries_110 = regionmask.defined_regions.natural_earth.countries_110"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print(\"Method: rasterize\")\n",
"%timeit -n 1 countries_110.mask(ds_GLOB, method=\"rasterize\")\n",
"%timeit -n 1 countries_110.mask(ds_GLOB, method=\"rasterize\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print(\"Method: shapely\")\n",
"%timeit -n 1 countries_110.mask(ds_GLOB, method=\"shapely\")\n",
"print(\"Method: legacy\")\n",
"%timeit -n 1 countries_110.mask(ds_GLOB, method=\"legacy\")"
"%timeit -n 1 countries_110.mask(ds_GLOB, method=\"shapely\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
"source": [
"print(\"Method: legacy\")\n",
"%timeit -n 1 countries_110.mask(ds_GLOB, method=\"legacy\")"
]
}
],
"metadata": {
Expand Down

0 comments on commit 8141bec

Please sign in to comment.