Guest User

Untitled

a guest
Jan 21st, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 81.89 KB | None | 0 0
  1. {
  2. "cells": [
  3. {
  4. "cell_type": "code",
  5. "execution_count": 1,
  6. "metadata": {},
  7. "outputs": [],
  8. "source": [
  9. "import numpy as np\n",
  10. "import xarray as xr # html_repr branch"
  11. ]
  12. },
  13. {
  14. "cell_type": "code",
  15. "execution_count": 2,
  16. "metadata": {},
  17. "outputs": [],
  18. "source": [
  19. "lon = np.array([[-99.83, -99.32, -99.56],\n",
  20. " [-99.27, -99.39, -99.91],\n",
  21. " [-99.79, -99.23, -99.42]])\n",
  22. "lat = np.array([[ 42.25, 42.21, 42.82],\n",
  23. " [ 42.91, 42.47, 42.71],\n",
  24. " [ 42.63, 42.59, 42.29]])\n",
  25. "\n",
  26. "ds = xr.Dataset(data_vars={'foo': (('x', 'y'), np.random.rand(3, 3))},\n",
  27. " coords={\n",
  28. " 'x': [0, 1, 2], 'y': [0, 1, 2],\n",
  29. " 'lon': (('x', 'y'), lon, {'standard_name': 'longitude'}),\n",
  30. " 'lat': (('x', 'y'), lat, {'standard_name': 'latitude'})\n",
  31. " },\n",
  32. " attrs={'title': 'example dataset'})"
  33. ]
  34. },
  35. {
  36. "cell_type": "code",
  37. "execution_count": 3,
  38. "metadata": {},
  39. "outputs": [
  40. {
  41. "data": {
  42. "text/html": [
  43. "<div><style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
  44. " *\n",
  45. " */\n",
  46. "\n",
  47. ".xr-wrap {\n",
  48. " width: 540px;\n",
  49. " font-size: 13px;\n",
  50. " line-height: 1.5;\n",
  51. " background-color: #fff;\n",
  52. "}\n",
  53. "\n",
  54. ".xr-wrap ul {\n",
  55. " padding: 0;\n",
  56. "}\n",
  57. "\n",
  58. ".xr-wrap input + label {\n",
  59. " margin-bottom: 0 !important;\n",
  60. "}\n",
  61. "\n",
  62. ".xr-header {\n",
  63. " padding: 6px 0 6px 3px;\n",
  64. " border-bottom-width: 1px;\n",
  65. " border-bottom-style: solid;\n",
  66. " border-bottom-color: #777;\n",
  67. " color: #555;;\n",
  68. "}\n",
  69. "\n",
  70. ".xr-header > div,\n",
  71. ".xr-header > ul {\n",
  72. " display: inline;\n",
  73. " margin-top: 0;\n",
  74. " margin-bottom: 0;\n",
  75. "}\n",
  76. "\n",
  77. ".xr-dataarray-cls,\n",
  78. ".xr-dataarray-name {\n",
  79. " margin-left: 2px;\n",
  80. " margin-right: 10px;\n",
  81. "}\n",
  82. "\n",
  83. ".xr-dataarray-name {\n",
  84. " color: #000;\n",
  85. "}\n",
  86. "\n",
  87. "ul.xr-sections {\n",
  88. " list-style: none !important;\n",
  89. " padding: 3px !important;\n",
  90. " margin: 0 !important;\n",
  91. "}\n",
  92. "\n",
  93. "input.xr-section-in {\n",
  94. " display: none;\n",
  95. "}\n",
  96. "\n",
  97. "input.xr-section-in + label {\n",
  98. " display: inline-block;\n",
  99. " width: 140px;\n",
  100. " color: #555;\n",
  101. " font-weight: 500;\n",
  102. " padding: 4px 0 2px 0;\n",
  103. "}\n",
  104. "\n",
  105. "input.xr-section-in:enabled + label {\n",
  106. " cursor: pointer;\n",
  107. "}\n",
  108. "\n",
  109. "input.xr-section-in + label:before {\n",
  110. " display: inline-block;\n",
  111. " content: '►';\n",
  112. " font-size: 11px;\n",
  113. " width: 15px;\n",
  114. " text-align: center;\n",
  115. "}\n",
  116. "\n",
  117. "input.xr-section-in:checked + label:before {\n",
  118. " content: '▼';\n",
  119. "}\n",
  120. "\n",
  121. "input.xr-section-in:disabled + label:before {\n",
  122. " color: #777;\n",
  123. "}\n",
  124. "\n",
  125. "input.xr-section-in + label > span {\n",
  126. " display: inline-block;\n",
  127. " margin-left: 4px;\n",
  128. "}\n",
  129. "\n",
  130. "input.xr-section-in:checked + label > span {\n",
  131. " display: none;\n",
  132. "}\n",
  133. "\n",
  134. "input.xr-section-in ~ ul {\n",
  135. " display: none;\n",
  136. "}\n",
  137. "\n",
  138. "input.xr-section-in:checked ~ ul {\n",
  139. " display: block;\n",
  140. "}\n",
  141. "\n",
  142. ".xr-sections summary > div {\n",
  143. " display: inline-block;\n",
  144. " cursor: pointer;\n",
  145. " width: 140px;\n",
  146. " color: #555;\n",
  147. " font-weight: 500;\n",
  148. " padding: 4px 0 2px 0;\n",
  149. "}\n",
  150. "\n",
  151. ".xr-dim-list {\n",
  152. " display: inline-block !important;\n",
  153. " list-style: none;\n",
  154. " padding: 0 !important;\n",
  155. "}\n",
  156. "\n",
  157. ".xr-dim-list li {\n",
  158. " display: inline-block;\n",
  159. " font-size: 13px !important;\n",
  160. " padding: 0;\n",
  161. " margin: 0;\n",
  162. "}\n",
  163. "\n",
  164. ".xr-dim-list:before {\n",
  165. " content: '(';\n",
  166. "}\n",
  167. "\n",
  168. ".xr-dim-list:after {\n",
  169. " content: ')';\n",
  170. "}\n",
  171. "\n",
  172. ".xr-dim-list li:not(:last-child):after {\n",
  173. " content: ',';\n",
  174. " padding-right: 5px;\n",
  175. "}\n",
  176. "\n",
  177. ".xr-has-index {\n",
  178. " text-decoration: underline;\n",
  179. "}\n",
  180. "\n",
  181. "input.xr-dataarray-in {\n",
  182. " display: none;\n",
  183. "}\n",
  184. "\n",
  185. "input.xr-dataarray-in + label {\n",
  186. " display: inline-block;\n",
  187. " width: 15px !important;\n",
  188. " vertical-align: top;\n",
  189. " padding: 4px 0 2px 0 !important;\n",
  190. "}\n",
  191. "\n",
  192. "input.xr-dataarray-in + label:before {\n",
  193. " content: '➕' !important;\n",
  194. "}\n",
  195. "\n",
  196. "input.xr-dataarray-in:checked + label:before {\n",
  197. " content: '➖' !important;\n",
  198. "}\n",
  199. "\n",
  200. "input.xr-dataarray-in:enabled + label {\n",
  201. " cursor: pointer;\n",
  202. "}\n",
  203. "\n",
  204. "input.xr-dataarray-in ~ pre,\n",
  205. "input.xr-dataarray-in ~ div {\n",
  206. " font-size: 12px;\n",
  207. " width: 500px;\n",
  208. " padding: 5px 0 4px 8px !important;\n",
  209. " margin: 0;\n",
  210. "}\n",
  211. "\n",
  212. "input.xr-dataarray-in ~ div > span {\n",
  213. " display: inline-block;\n",
  214. " margin-right: 4px;\n",
  215. "}\n",
  216. "\n",
  217. "input.xr-dataarray-in ~ pre {\n",
  218. " display: none;\n",
  219. "}\n",
  220. "\n",
  221. "input.xr-dataarray-in:checked ~ pre {\n",
  222. " display: inline-block;\n",
  223. "}\n",
  224. "\n",
  225. "input.xr-dataarray-in ~ div {\n",
  226. " display: inline-block;\n",
  227. "}\n",
  228. "\n",
  229. "input.xr-dataarray-in:checked ~ div {\n",
  230. " display: none;\n",
  231. "}\n",
  232. "\n",
  233. "ul.xr-var-list {\n",
  234. " list-style: none !important;\n",
  235. " padding: 0 !important;\n",
  236. " margin: 0 !important;\n",
  237. "}\n",
  238. "\n",
  239. ".xr-var-list > li {\n",
  240. " background-color: #fcfcfc;\n",
  241. " overflow: hidden;\n",
  242. "}\n",
  243. "\n",
  244. ".xr-var-list > li:nth-child(odd) {\n",
  245. " background-color: #efefef;\n",
  246. "}\n",
  247. "\n",
  248. ".xr-var-list li:hover {\n",
  249. " background-color: rgba(3, 169, 244, .2);\n",
  250. "}\n",
  251. "\n",
  252. ".xr-var-list li > span {\n",
  253. " display: inline-block;\n",
  254. "}\n",
  255. "\n",
  256. ".xr-var-list li input {\n",
  257. " display: none;\n",
  258. "}\n",
  259. "\n",
  260. ".xr-var-list li input:enabled + label {\n",
  261. " cursor: pointer;\n",
  262. "}\n",
  263. "\n",
  264. "input.xr-varname-in + label {\n",
  265. " display: inline-block;\n",
  266. " width: 140px;\n",
  267. " padding-left: 0;\n",
  268. "}\n",
  269. "\n",
  270. "input.xr-varname-in + label:before {\n",
  271. " content: ' ';\n",
  272. " display: inline-block;\n",
  273. " font-size: 11px;\n",
  274. " width: 15px;\n",
  275. " margin-left: 20px;\n",
  276. " margin-right: 5px;\n",
  277. " text-align: center;\n",
  278. " color: #aaa;\n",
  279. " text-decoration: none !important;\n",
  280. "}\n",
  281. "\n",
  282. "input.xr-varname-in ~ ul {\n",
  283. " display: none;\n",
  284. "}\n",
  285. "\n",
  286. "input.xr-varname-in:checked ~ ul {\n",
  287. " display: block;\n",
  288. "}\n",
  289. "\n",
  290. "input.xr-varname-in:enabled + label:before {\n",
  291. " content: 'a';\n",
  292. "}\n",
  293. "\n",
  294. "input.xr-varname-in:enabled + label:hover:before {\n",
  295. " color: #000;\n",
  296. "}\n",
  297. "\n",
  298. "input.xr-varname-in:checked + label:before {\n",
  299. " color: #ccc;\n",
  300. "}\n",
  301. "\n",
  302. ".xr-dims {\n",
  303. " width: 80px;\n",
  304. "}\n",
  305. "\n",
  306. ".xr-dtype {\n",
  307. " width: 96px;\n",
  308. " padding-right: 4px;\n",
  309. " text-align: right;\n",
  310. " color: #555;\n",
  311. "}\n",
  312. "\n",
  313. ".xr-values {\n",
  314. " width: 200px;\n",
  315. " text-align: left;\n",
  316. " color: #888;\n",
  317. " white-space: nowrap;\n",
  318. " font-size: 12px;\n",
  319. "}\n",
  320. "\n",
  321. ".xr-values > span:nth-child(odd) {\n",
  322. " color: rgba(0, 0, 0, .65);\n",
  323. "}\n",
  324. "\n",
  325. "input.xr-values-in + label:hover > span {\n",
  326. " color: #000;\n",
  327. "}\n",
  328. "\n",
  329. "input.xr-values-in:checked + label > span {\n",
  330. " color: #ccc;\n",
  331. "}\n",
  332. "\n",
  333. "input.xr-values-in ~ pre {\n",
  334. " display: none;\n",
  335. " background-color: white;\n",
  336. "}\n",
  337. "\n",
  338. "input.xr-values-in:checked ~ pre {\n",
  339. " display: block;\n",
  340. "}\n",
  341. "\n",
  342. "input.xr-values-in:checked + label > span {\n",
  343. " color: #ccc;\n",
  344. "}\n",
  345. "\n",
  346. ".xr-data-repr {\n",
  347. " font-size: 11px !important;\n",
  348. " background-color: #fff;\n",
  349. " padding: 4px 0 6px 40px !important;\n",
  350. " margin: 0 !important;\n",
  351. "}\n",
  352. "\n",
  353. ".xr-attr-list {\n",
  354. " list-style: none !important;\n",
  355. " background-color: #fff;\n",
  356. " padding: 0 0 6px 40px !important;\n",
  357. " color: #555;\n",
  358. "}\n",
  359. "\n",
  360. ".xr-attr-list li,\n",
  361. ".xr-attr-list li:hover {\n",
  362. " background-color: #fff;\n",
  363. "}\n",
  364. "</style><div class='xr-wrap'><div class='xr-header'>xarray.Dataset</div><ul class='xr-sections'><li><input id='section-cfe03ac8-7d7d-4c8b-93fd-d31fb17f3124' class='xr-section-in' type='checkbox' disabled ><label for='section-cfe03ac8-7d7d-4c8b-93fd-d31fb17f3124'>Dimensions:</label><ul class='xr-dim-list'><li><span class='xr-has-index'>x</span>: 3</li><li><span class='xr-has-index'>y</span>: 3</li></ul></li><li><input id='section-51836650-9a0d-46ac-8a38-3d6130f9f911' class='xr-section-in' type='checkbox' checked><label for='section-51836650-9a0d-46ac-8a38-3d6130f9f911'>Coordinates: <span>(4)</span></label><ul class='xr-var-list'><li><input id='attrs-34a99343-c3fc-4854-8f3a-ed7b9ca99097' class='xr-varname-in' type='checkbox' disabled><label class='xr-varname xr-has-index' for='attrs-34a99343-c3fc-4854-8f3a-ed7b9ca99097'>x</label><span class='xr-dims'>(x)</span><span class='xr-dtype'>int64</span><input id='values-82c7f468-6ad3-4867-aaaf-7ee93e4c0bab' class='xr-values-in' type='checkbox'><label for='values-82c7f468-6ad3-4867-aaaf-7ee93e4c0bab' class='xr-values'><span>0 </span><span>1 </span><span>2 </span></label><ul class='xr-attr-list'></ul><pre class='xr-data-repr'>array([0, 1, 2])</pre></li><li><input id='attrs-6fae6fda-d900-4aa6-a592-a621eaccdd86' class='xr-varname-in' type='checkbox' disabled><label class='xr-varname xr-has-index' for='attrs-6fae6fda-d900-4aa6-a592-a621eaccdd86'>y</label><span class='xr-dims'>(y)</span><span class='xr-dtype'>int64</span><input id='values-a4bf772b-b971-4122-a6ff-73be63c53c82' class='xr-values-in' type='checkbox'><label for='values-a4bf772b-b971-4122-a6ff-73be63c53c82' class='xr-values'><span>0 </span><span>1 </span><span>2 </span></label><ul class='xr-attr-list'></ul><pre class='xr-data-repr'>array([0, 1, 2])</pre></li><li><input id='attrs-58f341c5-4c3a-461b-a622-1ba8c1ed104c' class='xr-varname-in' type='checkbox' ><label class='xr-varname' for='attrs-58f341c5-4c3a-461b-a622-1ba8c1ed104c'>lon</label><span class='xr-dims'>(x, y)</span><span class='xr-dtype'>float64</span><input id='values-7c4a386d-fa96-48d0-b8fc-40654d711804' class='xr-values-in' type='checkbox'><label for='values-7c4a386d-fa96-48d0-b8fc-40654d711804' class='xr-values'><span>-99.83 </span><span>-99.32 </span><span>-99.56 </span><span>-99.27 </span><span>... </span></label><ul class='xr-attr-list'><li>standard_name : longitude</li></ul><pre class='xr-data-repr'>array([[-99.83, -99.32, -99.56],\n",
  365. " [-99.27, -99.39, -99.91],\n",
  366. " [-99.79, -99.23, -99.42]])</pre></li><li><input id='attrs-0cbe606b-0a2a-4fb1-b040-d131de6d62b9' class='xr-varname-in' type='checkbox' ><label class='xr-varname' for='attrs-0cbe606b-0a2a-4fb1-b040-d131de6d62b9'>lat</label><span class='xr-dims'>(x, y)</span><span class='xr-dtype'>float64</span><input id='values-266ca79f-12c5-4460-84d0-6ca9580e4a64' class='xr-values-in' type='checkbox'><label for='values-266ca79f-12c5-4460-84d0-6ca9580e4a64' class='xr-values'><span>42.25 </span><span>42.21 </span><span>42.82 </span><span>42.91 </span><span>42.47 </span><span>... </span></label><ul class='xr-attr-list'><li>standard_name : latitude</li></ul><pre class='xr-data-repr'>array([[ 42.25, 42.21, 42.82],\n",
  367. " [ 42.91, 42.47, 42.71],\n",
  368. " [ 42.63, 42.59, 42.29]])</pre></li></ul></li><li><input id='section-60c42311-a1ab-40a0-b30b-3c865c6d098d' class='xr-section-in' type='checkbox' checked><label for='section-60c42311-a1ab-40a0-b30b-3c865c6d098d'>Data variables: <span>(1)</span></label><ul class='xr-var-list'><li><input id='attrs-edc64fbe-1cdc-48ee-9825-4a6c91455c54' class='xr-varname-in' type='checkbox' disabled><label class='xr-varname' for='attrs-edc64fbe-1cdc-48ee-9825-4a6c91455c54'>foo</label><span class='xr-dims'>(x, y)</span><span class='xr-dtype'>float64</span><input id='values-2f217e0a-6df4-4ef6-b9ba-f5898d8008bc' class='xr-values-in' type='checkbox'><label for='values-2f217e0a-6df4-4ef6-b9ba-f5898d8008bc' class='xr-values'><span>0.121 </span><span>0.5573 </span><span>0.04989 </span><span>0.9803 </span><span>... </span></label><ul class='xr-attr-list'></ul><pre class='xr-data-repr'>array([[ 0.12099674, 0.5573085 , 0.04989096],\n",
  369. " [ 0.98033112, 0.84505955, 0.77337044],\n",
  370. " [ 0.43097088, 0.34742313, 0.59263735]])</pre></li></ul></li><li><input id='section-629963d3-e6a3-4496-b303-9df4895b3258' class='xr-section-in' type='checkbox' checked><label for='section-629963d3-e6a3-4496-b303-9df4895b3258'>Attributes: <span>(1)</span></label><ul class='xr-attr-list'><li>title : example dataset</li></ul></li></ul></div></div>"
  371. ],
  372. "text/plain": [
  373. "<xarray.Dataset>\n",
  374. "Dimensions: (x: 3, y: 3)\n",
  375. "Coordinates:\n",
  376. " * x (x) int64 0 1 2\n",
  377. " * y (y) int64 0 1 2\n",
  378. " lon (x, y) float64 -99.83 -99.32 -99.56 -99.27 -99.39 -99.91 -99.79 ...\n",
  379. " lat (x, y) float64 42.25 42.21 42.82 42.91 42.47 42.71 42.63 42.59 ...\n",
  380. "Data variables:\n",
  381. " foo (x, y) float64 0.121 0.5573 0.04989 0.9803 0.8451 0.7734 0.431 ...\n",
  382. "Attributes:\n",
  383. " title: example dataset"
  384. ]
  385. },
  386. "execution_count": 3,
  387. "metadata": {},
  388. "output_type": "execute_result"
  389. }
  390. ],
  391. "source": [
  392. "ds"
  393. ]
  394. },
  395. {
  396. "cell_type": "code",
  397. "execution_count": 4,
  398. "metadata": {},
  399. "outputs": [
  400. {
  401. "data": {
  402. "text/html": [
  403. "<div><style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
  404. " *\n",
  405. " */\n",
  406. "\n",
  407. ".xr-wrap {\n",
  408. " width: 540px;\n",
  409. " font-size: 13px;\n",
  410. " line-height: 1.5;\n",
  411. " background-color: #fff;\n",
  412. "}\n",
  413. "\n",
  414. ".xr-wrap ul {\n",
  415. " padding: 0;\n",
  416. "}\n",
  417. "\n",
  418. ".xr-wrap input + label {\n",
  419. " margin-bottom: 0 !important;\n",
  420. "}\n",
  421. "\n",
  422. ".xr-header {\n",
  423. " padding: 6px 0 6px 3px;\n",
  424. " border-bottom-width: 1px;\n",
  425. " border-bottom-style: solid;\n",
  426. " border-bottom-color: #777;\n",
  427. " color: #555;;\n",
  428. "}\n",
  429. "\n",
  430. ".xr-header > div,\n",
  431. ".xr-header > ul {\n",
  432. " display: inline;\n",
  433. " margin-top: 0;\n",
  434. " margin-bottom: 0;\n",
  435. "}\n",
  436. "\n",
  437. ".xr-dataarray-cls,\n",
  438. ".xr-dataarray-name {\n",
  439. " margin-left: 2px;\n",
  440. " margin-right: 10px;\n",
  441. "}\n",
  442. "\n",
  443. ".xr-dataarray-name {\n",
  444. " color: #000;\n",
  445. "}\n",
  446. "\n",
  447. "ul.xr-sections {\n",
  448. " list-style: none !important;\n",
  449. " padding: 3px !important;\n",
  450. " margin: 0 !important;\n",
  451. "}\n",
  452. "\n",
  453. "input.xr-section-in {\n",
  454. " display: none;\n",
  455. "}\n",
  456. "\n",
  457. "input.xr-section-in + label {\n",
  458. " display: inline-block;\n",
  459. " width: 140px;\n",
  460. " color: #555;\n",
  461. " font-weight: 500;\n",
  462. " padding: 4px 0 2px 0;\n",
  463. "}\n",
  464. "\n",
  465. "input.xr-section-in:enabled + label {\n",
  466. " cursor: pointer;\n",
  467. "}\n",
  468. "\n",
  469. "input.xr-section-in + label:before {\n",
  470. " display: inline-block;\n",
  471. " content: '►';\n",
  472. " font-size: 11px;\n",
  473. " width: 15px;\n",
  474. " text-align: center;\n",
  475. "}\n",
  476. "\n",
  477. "input.xr-section-in:checked + label:before {\n",
  478. " content: '▼';\n",
  479. "}\n",
  480. "\n",
  481. "input.xr-section-in:disabled + label:before {\n",
  482. " color: #777;\n",
  483. "}\n",
  484. "\n",
  485. "input.xr-section-in + label > span {\n",
  486. " display: inline-block;\n",
  487. " margin-left: 4px;\n",
  488. "}\n",
  489. "\n",
  490. "input.xr-section-in:checked + label > span {\n",
  491. " display: none;\n",
  492. "}\n",
  493. "\n",
  494. "input.xr-section-in ~ ul {\n",
  495. " display: none;\n",
  496. "}\n",
  497. "\n",
  498. "input.xr-section-in:checked ~ ul {\n",
  499. " display: block;\n",
  500. "}\n",
  501. "\n",
  502. ".xr-sections summary > div {\n",
  503. " display: inline-block;\n",
  504. " cursor: pointer;\n",
  505. " width: 140px;\n",
  506. " color: #555;\n",
  507. " font-weight: 500;\n",
  508. " padding: 4px 0 2px 0;\n",
  509. "}\n",
  510. "\n",
  511. ".xr-dim-list {\n",
  512. " display: inline-block !important;\n",
  513. " list-style: none;\n",
  514. " padding: 0 !important;\n",
  515. "}\n",
  516. "\n",
  517. ".xr-dim-list li {\n",
  518. " display: inline-block;\n",
  519. " font-size: 13px !important;\n",
  520. " padding: 0;\n",
  521. " margin: 0;\n",
  522. "}\n",
  523. "\n",
  524. ".xr-dim-list:before {\n",
  525. " content: '(';\n",
  526. "}\n",
  527. "\n",
  528. ".xr-dim-list:after {\n",
  529. " content: ')';\n",
  530. "}\n",
  531. "\n",
  532. ".xr-dim-list li:not(:last-child):after {\n",
  533. " content: ',';\n",
  534. " padding-right: 5px;\n",
  535. "}\n",
  536. "\n",
  537. ".xr-has-index {\n",
  538. " text-decoration: underline;\n",
  539. "}\n",
  540. "\n",
  541. "input.xr-dataarray-in {\n",
  542. " display: none;\n",
  543. "}\n",
  544. "\n",
  545. "input.xr-dataarray-in + label {\n",
  546. " display: inline-block;\n",
  547. " width: 15px !important;\n",
  548. " vertical-align: top;\n",
  549. " padding: 4px 0 2px 0 !important;\n",
  550. "}\n",
  551. "\n",
  552. "input.xr-dataarray-in + label:before {\n",
  553. " content: '➕' !important;\n",
  554. "}\n",
  555. "\n",
  556. "input.xr-dataarray-in:checked + label:before {\n",
  557. " content: '➖' !important;\n",
  558. "}\n",
  559. "\n",
  560. "input.xr-dataarray-in:enabled + label {\n",
  561. " cursor: pointer;\n",
  562. "}\n",
  563. "\n",
  564. "input.xr-dataarray-in ~ pre,\n",
  565. "input.xr-dataarray-in ~ div {\n",
  566. " font-size: 12px;\n",
  567. " width: 500px;\n",
  568. " padding: 5px 0 4px 8px !important;\n",
  569. " margin: 0;\n",
  570. "}\n",
  571. "\n",
  572. "input.xr-dataarray-in ~ div > span {\n",
  573. " display: inline-block;\n",
  574. " margin-right: 4px;\n",
  575. "}\n",
  576. "\n",
  577. "input.xr-dataarray-in ~ pre {\n",
  578. " display: none;\n",
  579. "}\n",
  580. "\n",
  581. "input.xr-dataarray-in:checked ~ pre {\n",
  582. " display: inline-block;\n",
  583. "}\n",
  584. "\n",
  585. "input.xr-dataarray-in ~ div {\n",
  586. " display: inline-block;\n",
  587. "}\n",
  588. "\n",
  589. "input.xr-dataarray-in:checked ~ div {\n",
  590. " display: none;\n",
  591. "}\n",
  592. "\n",
  593. "ul.xr-var-list {\n",
  594. " list-style: none !important;\n",
  595. " padding: 0 !important;\n",
  596. " margin: 0 !important;\n",
  597. "}\n",
  598. "\n",
  599. ".xr-var-list > li {\n",
  600. " background-color: #fcfcfc;\n",
  601. " overflow: hidden;\n",
  602. "}\n",
  603. "\n",
  604. ".xr-var-list > li:nth-child(odd) {\n",
  605. " background-color: #efefef;\n",
  606. "}\n",
  607. "\n",
  608. ".xr-var-list li:hover {\n",
  609. " background-color: rgba(3, 169, 244, .2);\n",
  610. "}\n",
  611. "\n",
  612. ".xr-var-list li > span {\n",
  613. " display: inline-block;\n",
  614. "}\n",
  615. "\n",
  616. ".xr-var-list li input {\n",
  617. " display: none;\n",
  618. "}\n",
  619. "\n",
  620. ".xr-var-list li input:enabled + label {\n",
  621. " cursor: pointer;\n",
  622. "}\n",
  623. "\n",
  624. "input.xr-varname-in + label {\n",
  625. " display: inline-block;\n",
  626. " width: 140px;\n",
  627. " padding-left: 0;\n",
  628. "}\n",
  629. "\n",
  630. "input.xr-varname-in + label:before {\n",
  631. " content: ' ';\n",
  632. " display: inline-block;\n",
  633. " font-size: 11px;\n",
  634. " width: 15px;\n",
  635. " margin-left: 20px;\n",
  636. " margin-right: 5px;\n",
  637. " text-align: center;\n",
  638. " color: #aaa;\n",
  639. " text-decoration: none !important;\n",
  640. "}\n",
  641. "\n",
  642. "input.xr-varname-in ~ ul {\n",
  643. " display: none;\n",
  644. "}\n",
  645. "\n",
  646. "input.xr-varname-in:checked ~ ul {\n",
  647. " display: block;\n",
  648. "}\n",
  649. "\n",
  650. "input.xr-varname-in:enabled + label:before {\n",
  651. " content: 'a';\n",
  652. "}\n",
  653. "\n",
  654. "input.xr-varname-in:enabled + label:hover:before {\n",
  655. " color: #000;\n",
  656. "}\n",
  657. "\n",
  658. "input.xr-varname-in:checked + label:before {\n",
  659. " color: #ccc;\n",
  660. "}\n",
  661. "\n",
  662. ".xr-dims {\n",
  663. " width: 80px;\n",
  664. "}\n",
  665. "\n",
  666. ".xr-dtype {\n",
  667. " width: 96px;\n",
  668. " padding-right: 4px;\n",
  669. " text-align: right;\n",
  670. " color: #555;\n",
  671. "}\n",
  672. "\n",
  673. ".xr-values {\n",
  674. " width: 200px;\n",
  675. " text-align: left;\n",
  676. " color: #888;\n",
  677. " white-space: nowrap;\n",
  678. " font-size: 12px;\n",
  679. "}\n",
  680. "\n",
  681. ".xr-values > span:nth-child(odd) {\n",
  682. " color: rgba(0, 0, 0, .65);\n",
  683. "}\n",
  684. "\n",
  685. "input.xr-values-in + label:hover > span {\n",
  686. " color: #000;\n",
  687. "}\n",
  688. "\n",
  689. "input.xr-values-in:checked + label > span {\n",
  690. " color: #ccc;\n",
  691. "}\n",
  692. "\n",
  693. "input.xr-values-in ~ pre {\n",
  694. " display: none;\n",
  695. " background-color: white;\n",
  696. "}\n",
  697. "\n",
  698. "input.xr-values-in:checked ~ pre {\n",
  699. " display: block;\n",
  700. "}\n",
  701. "\n",
  702. "input.xr-values-in:checked + label > span {\n",
  703. " color: #ccc;\n",
  704. "}\n",
  705. "\n",
  706. ".xr-data-repr {\n",
  707. " font-size: 11px !important;\n",
  708. " background-color: #fff;\n",
  709. " padding: 4px 0 6px 40px !important;\n",
  710. " margin: 0 !important;\n",
  711. "}\n",
  712. "\n",
  713. ".xr-attr-list {\n",
  714. " list-style: none !important;\n",
  715. " background-color: #fff;\n",
  716. " padding: 0 0 6px 40px !important;\n",
  717. " color: #555;\n",
  718. "}\n",
  719. "\n",
  720. ".xr-attr-list li,\n",
  721. ".xr-attr-list li:hover {\n",
  722. " background-color: #fff;\n",
  723. "}\n",
  724. "</style><div class='xr-wrap'><div class='xr-header'><div class='xr-dataarray-cls'>xarray.DataArray</div><div class='xr-dataarray-name'>'foo'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>x</span>: 3</li><li><span class='xr-has-index'>y</span>: 3</li></ul></div><ul class='xr-sections'><li><input id='section-0d6eb0b5-53ea-45c9-b341-a11f2d923137' class='xr-dataarray-in' type='checkbox' checked><label for='section-0d6eb0b5-53ea-45c9-b341-a11f2d923137'></label><div><span>0.121 </span><span>0.5573 </span><span>0.04989 </span><span>0.9803 </span><span>0.8451 </span><span>0.7734 </span><span>0.431 </span><span>0.3474 </span><span>0.5926 </span></div><pre>array([[ 0.12099674, 0.5573085 , 0.04989096],\n",
  725. " [ 0.98033112, 0.84505955, 0.77337044],\n",
  726. " [ 0.43097088, 0.34742313, 0.59263735]])</pre></li><li><input id='section-096dc2b7-724f-443a-9c50-ed9278f9b15c' class='xr-section-in' type='checkbox' checked><label for='section-096dc2b7-724f-443a-9c50-ed9278f9b15c'>Coordinates: <span>(4)</span></label><ul class='xr-var-list'><li><input id='attrs-8b3077b6-b51d-46e5-893e-466c686dfffe' class='xr-varname-in' type='checkbox' disabled><label class='xr-varname xr-has-index' for='attrs-8b3077b6-b51d-46e5-893e-466c686dfffe'>x</label><span class='xr-dims'>(x)</span><span class='xr-dtype'>int64</span><input id='values-cfee4eae-5d1f-4f9c-b78c-2c65a10427d3' class='xr-values-in' type='checkbox'><label for='values-cfee4eae-5d1f-4f9c-b78c-2c65a10427d3' class='xr-values'><span>0 </span><span>1 </span><span>2 </span></label><ul class='xr-attr-list'></ul><pre class='xr-data-repr'>array([0, 1, 2])</pre></li><li><input id='attrs-b4e2ce3a-4cf0-4445-b6f9-d1d47c1968ba' class='xr-varname-in' type='checkbox' disabled><label class='xr-varname xr-has-index' for='attrs-b4e2ce3a-4cf0-4445-b6f9-d1d47c1968ba'>y</label><span class='xr-dims'>(y)</span><span class='xr-dtype'>int64</span><input id='values-3f9c7b8a-0ed7-470b-a1a0-21b21740fa17' class='xr-values-in' type='checkbox'><label for='values-3f9c7b8a-0ed7-470b-a1a0-21b21740fa17' class='xr-values'><span>0 </span><span>1 </span><span>2 </span></label><ul class='xr-attr-list'></ul><pre class='xr-data-repr'>array([0, 1, 2])</pre></li><li><input id='attrs-2a9abc92-e4d2-45fc-a85e-99d6f3d544b9' class='xr-varname-in' type='checkbox' ><label class='xr-varname' for='attrs-2a9abc92-e4d2-45fc-a85e-99d6f3d544b9'>lon</label><span class='xr-dims'>(x, y)</span><span class='xr-dtype'>float64</span><input id='values-a26a4aa1-939a-4cf8-bff5-b99880248640' class='xr-values-in' type='checkbox'><label for='values-a26a4aa1-939a-4cf8-bff5-b99880248640' class='xr-values'><span>-99.83 </span><span>-99.32 </span><span>-99.56 </span><span>-99.27 </span><span>... </span></label><ul class='xr-attr-list'><li>standard_name : longitude</li></ul><pre class='xr-data-repr'>array([[-99.83, -99.32, -99.56],\n",
  727. " [-99.27, -99.39, -99.91],\n",
  728. " [-99.79, -99.23, -99.42]])</pre></li><li><input id='attrs-c1863c5a-2b01-4e46-9b0e-441e2969b308' class='xr-varname-in' type='checkbox' ><label class='xr-varname' for='attrs-c1863c5a-2b01-4e46-9b0e-441e2969b308'>lat</label><span class='xr-dims'>(x, y)</span><span class='xr-dtype'>float64</span><input id='values-5e1a6436-9609-48fc-8e41-7da2e693dc05' class='xr-values-in' type='checkbox'><label for='values-5e1a6436-9609-48fc-8e41-7da2e693dc05' class='xr-values'><span>42.25 </span><span>42.21 </span><span>42.82 </span><span>42.91 </span><span>42.47 </span><span>... </span></label><ul class='xr-attr-list'><li>standard_name : latitude</li></ul><pre class='xr-data-repr'>array([[ 42.25, 42.21, 42.82],\n",
  729. " [ 42.91, 42.47, 42.71],\n",
  730. " [ 42.63, 42.59, 42.29]])</pre></li></ul></li><li><input id='section-d194a4c4-0ac2-4c4d-a1a4-46647f1e1106' class='xr-section-in' type='checkbox' ><label for='section-d194a4c4-0ac2-4c4d-a1a4-46647f1e1106'>Attributes: <span>(0)</span></label><ul class='xr-attr-list'></ul></li></ul></div></div>"
  731. ],
  732. "text/plain": [
  733. "<xarray.DataArray 'foo' (x: 3, y: 3)>\n",
  734. "array([[ 0.120997, 0.557308, 0.049891],\n",
  735. " [ 0.980331, 0.84506 , 0.77337 ],\n",
  736. " [ 0.430971, 0.347423, 0.592637]])\n",
  737. "Coordinates:\n",
  738. " * x (x) int64 0 1 2\n",
  739. " * y (y) int64 0 1 2\n",
  740. " lon (x, y) float64 -99.83 -99.32 -99.56 -99.27 -99.39 -99.91 -99.79 ...\n",
  741. " lat (x, y) float64 42.25 42.21 42.82 42.91 42.47 42.71 42.63 42.59 ..."
  742. ]
  743. },
  744. "execution_count": 4,
  745. "metadata": {},
  746. "output_type": "execute_result"
  747. }
  748. ],
  749. "source": [
  750. "ds.foo"
  751. ]
  752. },
  753. {
  754. "cell_type": "code",
  755. "execution_count": 5,
  756. "metadata": {},
  757. "outputs": [
  758. {
  759. "data": {
  760. "text/html": [
  761. "<div><style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
  762. " *\n",
  763. " */\n",
  764. "\n",
  765. ".xr-wrap {\n",
  766. " width: 540px;\n",
  767. " font-size: 13px;\n",
  768. " line-height: 1.5;\n",
  769. " background-color: #fff;\n",
  770. "}\n",
  771. "\n",
  772. ".xr-wrap ul {\n",
  773. " padding: 0;\n",
  774. "}\n",
  775. "\n",
  776. ".xr-wrap input + label {\n",
  777. " margin-bottom: 0 !important;\n",
  778. "}\n",
  779. "\n",
  780. ".xr-header {\n",
  781. " padding: 6px 0 6px 3px;\n",
  782. " border-bottom-width: 1px;\n",
  783. " border-bottom-style: solid;\n",
  784. " border-bottom-color: #777;\n",
  785. " color: #555;;\n",
  786. "}\n",
  787. "\n",
  788. ".xr-header > div,\n",
  789. ".xr-header > ul {\n",
  790. " display: inline;\n",
  791. " margin-top: 0;\n",
  792. " margin-bottom: 0;\n",
  793. "}\n",
  794. "\n",
  795. ".xr-dataarray-cls,\n",
  796. ".xr-dataarray-name {\n",
  797. " margin-left: 2px;\n",
  798. " margin-right: 10px;\n",
  799. "}\n",
  800. "\n",
  801. ".xr-dataarray-name {\n",
  802. " color: #000;\n",
  803. "}\n",
  804. "\n",
  805. "ul.xr-sections {\n",
  806. " list-style: none !important;\n",
  807. " padding: 3px !important;\n",
  808. " margin: 0 !important;\n",
  809. "}\n",
  810. "\n",
  811. "input.xr-section-in {\n",
  812. " display: none;\n",
  813. "}\n",
  814. "\n",
  815. "input.xr-section-in + label {\n",
  816. " display: inline-block;\n",
  817. " width: 140px;\n",
  818. " color: #555;\n",
  819. " font-weight: 500;\n",
  820. " padding: 4px 0 2px 0;\n",
  821. "}\n",
  822. "\n",
  823. "input.xr-section-in:enabled + label {\n",
  824. " cursor: pointer;\n",
  825. "}\n",
  826. "\n",
  827. "input.xr-section-in + label:before {\n",
  828. " display: inline-block;\n",
  829. " content: '►';\n",
  830. " font-size: 11px;\n",
  831. " width: 15px;\n",
  832. " text-align: center;\n",
  833. "}\n",
  834. "\n",
  835. "input.xr-section-in:checked + label:before {\n",
  836. " content: '▼';\n",
  837. "}\n",
  838. "\n",
  839. "input.xr-section-in:disabled + label:before {\n",
  840. " color: #777;\n",
  841. "}\n",
  842. "\n",
  843. "input.xr-section-in + label > span {\n",
  844. " display: inline-block;\n",
  845. " margin-left: 4px;\n",
  846. "}\n",
  847. "\n",
  848. "input.xr-section-in:checked + label > span {\n",
  849. " display: none;\n",
  850. "}\n",
  851. "\n",
  852. "input.xr-section-in ~ ul {\n",
  853. " display: none;\n",
  854. "}\n",
  855. "\n",
  856. "input.xr-section-in:checked ~ ul {\n",
  857. " display: block;\n",
  858. "}\n",
  859. "\n",
  860. ".xr-sections summary > div {\n",
  861. " display: inline-block;\n",
  862. " cursor: pointer;\n",
  863. " width: 140px;\n",
  864. " color: #555;\n",
  865. " font-weight: 500;\n",
  866. " padding: 4px 0 2px 0;\n",
  867. "}\n",
  868. "\n",
  869. ".xr-dim-list {\n",
  870. " display: inline-block !important;\n",
  871. " list-style: none;\n",
  872. " padding: 0 !important;\n",
  873. "}\n",
  874. "\n",
  875. ".xr-dim-list li {\n",
  876. " display: inline-block;\n",
  877. " font-size: 13px !important;\n",
  878. " padding: 0;\n",
  879. " margin: 0;\n",
  880. "}\n",
  881. "\n",
  882. ".xr-dim-list:before {\n",
  883. " content: '(';\n",
  884. "}\n",
  885. "\n",
  886. ".xr-dim-list:after {\n",
  887. " content: ')';\n",
  888. "}\n",
  889. "\n",
  890. ".xr-dim-list li:not(:last-child):after {\n",
  891. " content: ',';\n",
  892. " padding-right: 5px;\n",
  893. "}\n",
  894. "\n",
  895. ".xr-has-index {\n",
  896. " text-decoration: underline;\n",
  897. "}\n",
  898. "\n",
  899. "input.xr-dataarray-in {\n",
  900. " display: none;\n",
  901. "}\n",
  902. "\n",
  903. "input.xr-dataarray-in + label {\n",
  904. " display: inline-block;\n",
  905. " width: 15px !important;\n",
  906. " vertical-align: top;\n",
  907. " padding: 4px 0 2px 0 !important;\n",
  908. "}\n",
  909. "\n",
  910. "input.xr-dataarray-in + label:before {\n",
  911. " content: '➕' !important;\n",
  912. "}\n",
  913. "\n",
  914. "input.xr-dataarray-in:checked + label:before {\n",
  915. " content: '➖' !important;\n",
  916. "}\n",
  917. "\n",
  918. "input.xr-dataarray-in:enabled + label {\n",
  919. " cursor: pointer;\n",
  920. "}\n",
  921. "\n",
  922. "input.xr-dataarray-in ~ pre,\n",
  923. "input.xr-dataarray-in ~ div {\n",
  924. " font-size: 12px;\n",
  925. " width: 500px;\n",
  926. " padding: 5px 0 4px 8px !important;\n",
  927. " margin: 0;\n",
  928. "}\n",
  929. "\n",
  930. "input.xr-dataarray-in ~ div > span {\n",
  931. " display: inline-block;\n",
  932. " margin-right: 4px;\n",
  933. "}\n",
  934. "\n",
  935. "input.xr-dataarray-in ~ pre {\n",
  936. " display: none;\n",
  937. "}\n",
  938. "\n",
  939. "input.xr-dataarray-in:checked ~ pre {\n",
  940. " display: inline-block;\n",
  941. "}\n",
  942. "\n",
  943. "input.xr-dataarray-in ~ div {\n",
  944. " display: inline-block;\n",
  945. "}\n",
  946. "\n",
  947. "input.xr-dataarray-in:checked ~ div {\n",
  948. " display: none;\n",
  949. "}\n",
  950. "\n",
  951. "ul.xr-var-list {\n",
  952. " list-style: none !important;\n",
  953. " padding: 0 !important;\n",
  954. " margin: 0 !important;\n",
  955. "}\n",
  956. "\n",
  957. ".xr-var-list > li {\n",
  958. " background-color: #fcfcfc;\n",
  959. " overflow: hidden;\n",
  960. "}\n",
  961. "\n",
  962. ".xr-var-list > li:nth-child(odd) {\n",
  963. " background-color: #efefef;\n",
  964. "}\n",
  965. "\n",
  966. ".xr-var-list li:hover {\n",
  967. " background-color: rgba(3, 169, 244, .2);\n",
  968. "}\n",
  969. "\n",
  970. ".xr-var-list li > span {\n",
  971. " display: inline-block;\n",
  972. "}\n",
  973. "\n",
  974. ".xr-var-list li input {\n",
  975. " display: none;\n",
  976. "}\n",
  977. "\n",
  978. ".xr-var-list li input:enabled + label {\n",
  979. " cursor: pointer;\n",
  980. "}\n",
  981. "\n",
  982. "input.xr-varname-in + label {\n",
  983. " display: inline-block;\n",
  984. " width: 140px;\n",
  985. " padding-left: 0;\n",
  986. "}\n",
  987. "\n",
  988. "input.xr-varname-in + label:before {\n",
  989. " content: ' ';\n",
  990. " display: inline-block;\n",
  991. " font-size: 11px;\n",
  992. " width: 15px;\n",
  993. " margin-left: 20px;\n",
  994. " margin-right: 5px;\n",
  995. " text-align: center;\n",
  996. " color: #aaa;\n",
  997. " text-decoration: none !important;\n",
  998. "}\n",
  999. "\n",
  1000. "input.xr-varname-in ~ ul {\n",
  1001. " display: none;\n",
  1002. "}\n",
  1003. "\n",
  1004. "input.xr-varname-in:checked ~ ul {\n",
  1005. " display: block;\n",
  1006. "}\n",
  1007. "\n",
  1008. "input.xr-varname-in:enabled + label:before {\n",
  1009. " content: 'a';\n",
  1010. "}\n",
  1011. "\n",
  1012. "input.xr-varname-in:enabled + label:hover:before {\n",
  1013. " color: #000;\n",
  1014. "}\n",
  1015. "\n",
  1016. "input.xr-varname-in:checked + label:before {\n",
  1017. " color: #ccc;\n",
  1018. "}\n",
  1019. "\n",
  1020. ".xr-dims {\n",
  1021. " width: 80px;\n",
  1022. "}\n",
  1023. "\n",
  1024. ".xr-dtype {\n",
  1025. " width: 96px;\n",
  1026. " padding-right: 4px;\n",
  1027. " text-align: right;\n",
  1028. " color: #555;\n",
  1029. "}\n",
  1030. "\n",
  1031. ".xr-values {\n",
  1032. " width: 200px;\n",
  1033. " text-align: left;\n",
  1034. " color: #888;\n",
  1035. " white-space: nowrap;\n",
  1036. " font-size: 12px;\n",
  1037. "}\n",
  1038. "\n",
  1039. ".xr-values > span:nth-child(odd) {\n",
  1040. " color: rgba(0, 0, 0, .65);\n",
  1041. "}\n",
  1042. "\n",
  1043. "input.xr-values-in + label:hover > span {\n",
  1044. " color: #000;\n",
  1045. "}\n",
  1046. "\n",
  1047. "input.xr-values-in:checked + label > span {\n",
  1048. " color: #ccc;\n",
  1049. "}\n",
  1050. "\n",
  1051. "input.xr-values-in ~ pre {\n",
  1052. " display: none;\n",
  1053. " background-color: white;\n",
  1054. "}\n",
  1055. "\n",
  1056. "input.xr-values-in:checked ~ pre {\n",
  1057. " display: block;\n",
  1058. "}\n",
  1059. "\n",
  1060. "input.xr-values-in:checked + label > span {\n",
  1061. " color: #ccc;\n",
  1062. "}\n",
  1063. "\n",
  1064. ".xr-data-repr {\n",
  1065. " font-size: 11px !important;\n",
  1066. " background-color: #fff;\n",
  1067. " padding: 4px 0 6px 40px !important;\n",
  1068. " margin: 0 !important;\n",
  1069. "}\n",
  1070. "\n",
  1071. ".xr-attr-list {\n",
  1072. " list-style: none !important;\n",
  1073. " background-color: #fff;\n",
  1074. " padding: 0 0 6px 40px !important;\n",
  1075. " color: #555;\n",
  1076. "}\n",
  1077. "\n",
  1078. ".xr-attr-list li,\n",
  1079. ".xr-attr-list li:hover {\n",
  1080. " background-color: #fff;\n",
  1081. "}\n",
  1082. "</style><div class='xr-wrap'><div class='xr-header'><div class='xr-dataarray-cls'>xarray.Variable</div><div class='xr-dataarray-name'></div><ul class='xr-dim-list'><li><span>x</span>: 3</li><li><span>y</span>: 3</li></ul></div><ul class='xr-sections'><li><input id='section-a92be818-c752-49f9-8758-006aae72dc6d' class='xr-dataarray-in' type='checkbox' checked><label for='section-a92be818-c752-49f9-8758-006aae72dc6d'></label><div><span>0.121 </span><span>0.5573 </span><span>0.04989 </span><span>0.9803 </span><span>0.8451 </span><span>0.7734 </span><span>0.431 </span><span>0.3474 </span><span>0.5926 </span></div><pre>array([[ 0.12099674, 0.5573085 , 0.04989096],\n",
  1083. " [ 0.98033112, 0.84505955, 0.77337044],\n",
  1084. " [ 0.43097088, 0.34742313, 0.59263735]])</pre></li><li><input id='section-ea1e37f8-b111-4736-b287-a5cf5b2bb56a' class='xr-section-in' type='checkbox' ><label for='section-ea1e37f8-b111-4736-b287-a5cf5b2bb56a'>Attributes: <span>(0)</span></label><ul class='xr-attr-list'></ul></li></ul></div></div>"
  1085. ],
  1086. "text/plain": [
  1087. "<xarray.Variable (x: 3, y: 3)>\n",
  1088. "array([[ 0.120997, 0.557308, 0.049891],\n",
  1089. " [ 0.980331, 0.84506 , 0.77337 ],\n",
  1090. " [ 0.430971, 0.347423, 0.592637]])"
  1091. ]
  1092. },
  1093. "execution_count": 5,
  1094. "metadata": {},
  1095. "output_type": "execute_result"
  1096. }
  1097. ],
  1098. "source": [
  1099. "ds.foo.variable"
  1100. ]
  1101. },
  1102. {
  1103. "cell_type": "code",
  1104. "execution_count": 6,
  1105. "metadata": {},
  1106. "outputs": [
  1107. {
  1108. "data": {
  1109. "text/html": [
  1110. "<div><style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
  1111. " *\n",
  1112. " */\n",
  1113. "\n",
  1114. ".xr-wrap {\n",
  1115. " width: 540px;\n",
  1116. " font-size: 13px;\n",
  1117. " line-height: 1.5;\n",
  1118. " background-color: #fff;\n",
  1119. "}\n",
  1120. "\n",
  1121. ".xr-wrap ul {\n",
  1122. " padding: 0;\n",
  1123. "}\n",
  1124. "\n",
  1125. ".xr-wrap input + label {\n",
  1126. " margin-bottom: 0 !important;\n",
  1127. "}\n",
  1128. "\n",
  1129. ".xr-header {\n",
  1130. " padding: 6px 0 6px 3px;\n",
  1131. " border-bottom-width: 1px;\n",
  1132. " border-bottom-style: solid;\n",
  1133. " border-bottom-color: #777;\n",
  1134. " color: #555;;\n",
  1135. "}\n",
  1136. "\n",
  1137. ".xr-header > div,\n",
  1138. ".xr-header > ul {\n",
  1139. " display: inline;\n",
  1140. " margin-top: 0;\n",
  1141. " margin-bottom: 0;\n",
  1142. "}\n",
  1143. "\n",
  1144. ".xr-dataarray-cls,\n",
  1145. ".xr-dataarray-name {\n",
  1146. " margin-left: 2px;\n",
  1147. " margin-right: 10px;\n",
  1148. "}\n",
  1149. "\n",
  1150. ".xr-dataarray-name {\n",
  1151. " color: #000;\n",
  1152. "}\n",
  1153. "\n",
  1154. "ul.xr-sections {\n",
  1155. " list-style: none !important;\n",
  1156. " padding: 3px !important;\n",
  1157. " margin: 0 !important;\n",
  1158. "}\n",
  1159. "\n",
  1160. "input.xr-section-in {\n",
  1161. " display: none;\n",
  1162. "}\n",
  1163. "\n",
  1164. "input.xr-section-in + label {\n",
  1165. " display: inline-block;\n",
  1166. " width: 140px;\n",
  1167. " color: #555;\n",
  1168. " font-weight: 500;\n",
  1169. " padding: 4px 0 2px 0;\n",
  1170. "}\n",
  1171. "\n",
  1172. "input.xr-section-in:enabled + label {\n",
  1173. " cursor: pointer;\n",
  1174. "}\n",
  1175. "\n",
  1176. "input.xr-section-in + label:before {\n",
  1177. " display: inline-block;\n",
  1178. " content: '►';\n",
  1179. " font-size: 11px;\n",
  1180. " width: 15px;\n",
  1181. " text-align: center;\n",
  1182. "}\n",
  1183. "\n",
  1184. "input.xr-section-in:checked + label:before {\n",
  1185. " content: '▼';\n",
  1186. "}\n",
  1187. "\n",
  1188. "input.xr-section-in:disabled + label:before {\n",
  1189. " color: #777;\n",
  1190. "}\n",
  1191. "\n",
  1192. "input.xr-section-in + label > span {\n",
  1193. " display: inline-block;\n",
  1194. " margin-left: 4px;\n",
  1195. "}\n",
  1196. "\n",
  1197. "input.xr-section-in:checked + label > span {\n",
  1198. " display: none;\n",
  1199. "}\n",
  1200. "\n",
  1201. "input.xr-section-in ~ ul {\n",
  1202. " display: none;\n",
  1203. "}\n",
  1204. "\n",
  1205. "input.xr-section-in:checked ~ ul {\n",
  1206. " display: block;\n",
  1207. "}\n",
  1208. "\n",
  1209. ".xr-sections summary > div {\n",
  1210. " display: inline-block;\n",
  1211. " cursor: pointer;\n",
  1212. " width: 140px;\n",
  1213. " color: #555;\n",
  1214. " font-weight: 500;\n",
  1215. " padding: 4px 0 2px 0;\n",
  1216. "}\n",
  1217. "\n",
  1218. ".xr-dim-list {\n",
  1219. " display: inline-block !important;\n",
  1220. " list-style: none;\n",
  1221. " padding: 0 !important;\n",
  1222. "}\n",
  1223. "\n",
  1224. ".xr-dim-list li {\n",
  1225. " display: inline-block;\n",
  1226. " font-size: 13px !important;\n",
  1227. " padding: 0;\n",
  1228. " margin: 0;\n",
  1229. "}\n",
  1230. "\n",
  1231. ".xr-dim-list:before {\n",
  1232. " content: '(';\n",
  1233. "}\n",
  1234. "\n",
  1235. ".xr-dim-list:after {\n",
  1236. " content: ')';\n",
  1237. "}\n",
  1238. "\n",
  1239. ".xr-dim-list li:not(:last-child):after {\n",
  1240. " content: ',';\n",
  1241. " padding-right: 5px;\n",
  1242. "}\n",
  1243. "\n",
  1244. ".xr-has-index {\n",
  1245. " text-decoration: underline;\n",
  1246. "}\n",
  1247. "\n",
  1248. "input.xr-dataarray-in {\n",
  1249. " display: none;\n",
  1250. "}\n",
  1251. "\n",
  1252. "input.xr-dataarray-in + label {\n",
  1253. " display: inline-block;\n",
  1254. " width: 15px !important;\n",
  1255. " vertical-align: top;\n",
  1256. " padding: 4px 0 2px 0 !important;\n",
  1257. "}\n",
  1258. "\n",
  1259. "input.xr-dataarray-in + label:before {\n",
  1260. " content: '➕' !important;\n",
  1261. "}\n",
  1262. "\n",
  1263. "input.xr-dataarray-in:checked + label:before {\n",
  1264. " content: '➖' !important;\n",
  1265. "}\n",
  1266. "\n",
  1267. "input.xr-dataarray-in:enabled + label {\n",
  1268. " cursor: pointer;\n",
  1269. "}\n",
  1270. "\n",
  1271. "input.xr-dataarray-in ~ pre,\n",
  1272. "input.xr-dataarray-in ~ div {\n",
  1273. " font-size: 12px;\n",
  1274. " width: 500px;\n",
  1275. " padding: 5px 0 4px 8px !important;\n",
  1276. " margin: 0;\n",
  1277. "}\n",
  1278. "\n",
  1279. "input.xr-dataarray-in ~ div > span {\n",
  1280. " display: inline-block;\n",
  1281. " margin-right: 4px;\n",
  1282. "}\n",
  1283. "\n",
  1284. "input.xr-dataarray-in ~ pre {\n",
  1285. " display: none;\n",
  1286. "}\n",
  1287. "\n",
  1288. "input.xr-dataarray-in:checked ~ pre {\n",
  1289. " display: inline-block;\n",
  1290. "}\n",
  1291. "\n",
  1292. "input.xr-dataarray-in ~ div {\n",
  1293. " display: inline-block;\n",
  1294. "}\n",
  1295. "\n",
  1296. "input.xr-dataarray-in:checked ~ div {\n",
  1297. " display: none;\n",
  1298. "}\n",
  1299. "\n",
  1300. "ul.xr-var-list {\n",
  1301. " list-style: none !important;\n",
  1302. " padding: 0 !important;\n",
  1303. " margin: 0 !important;\n",
  1304. "}\n",
  1305. "\n",
  1306. ".xr-var-list > li {\n",
  1307. " background-color: #fcfcfc;\n",
  1308. " overflow: hidden;\n",
  1309. "}\n",
  1310. "\n",
  1311. ".xr-var-list > li:nth-child(odd) {\n",
  1312. " background-color: #efefef;\n",
  1313. "}\n",
  1314. "\n",
  1315. ".xr-var-list li:hover {\n",
  1316. " background-color: rgba(3, 169, 244, .2);\n",
  1317. "}\n",
  1318. "\n",
  1319. ".xr-var-list li > span {\n",
  1320. " display: inline-block;\n",
  1321. "}\n",
  1322. "\n",
  1323. ".xr-var-list li input {\n",
  1324. " display: none;\n",
  1325. "}\n",
  1326. "\n",
  1327. ".xr-var-list li input:enabled + label {\n",
  1328. " cursor: pointer;\n",
  1329. "}\n",
  1330. "\n",
  1331. "input.xr-varname-in + label {\n",
  1332. " display: inline-block;\n",
  1333. " width: 140px;\n",
  1334. " padding-left: 0;\n",
  1335. "}\n",
  1336. "\n",
  1337. "input.xr-varname-in + label:before {\n",
  1338. " content: ' ';\n",
  1339. " display: inline-block;\n",
  1340. " font-size: 11px;\n",
  1341. " width: 15px;\n",
  1342. " margin-left: 20px;\n",
  1343. " margin-right: 5px;\n",
  1344. " text-align: center;\n",
  1345. " color: #aaa;\n",
  1346. " text-decoration: none !important;\n",
  1347. "}\n",
  1348. "\n",
  1349. "input.xr-varname-in ~ ul {\n",
  1350. " display: none;\n",
  1351. "}\n",
  1352. "\n",
  1353. "input.xr-varname-in:checked ~ ul {\n",
  1354. " display: block;\n",
  1355. "}\n",
  1356. "\n",
  1357. "input.xr-varname-in:enabled + label:before {\n",
  1358. " content: 'a';\n",
  1359. "}\n",
  1360. "\n",
  1361. "input.xr-varname-in:enabled + label:hover:before {\n",
  1362. " color: #000;\n",
  1363. "}\n",
  1364. "\n",
  1365. "input.xr-varname-in:checked + label:before {\n",
  1366. " color: #ccc;\n",
  1367. "}\n",
  1368. "\n",
  1369. ".xr-dims {\n",
  1370. " width: 80px;\n",
  1371. "}\n",
  1372. "\n",
  1373. ".xr-dtype {\n",
  1374. " width: 96px;\n",
  1375. " padding-right: 4px;\n",
  1376. " text-align: right;\n",
  1377. " color: #555;\n",
  1378. "}\n",
  1379. "\n",
  1380. ".xr-values {\n",
  1381. " width: 200px;\n",
  1382. " text-align: left;\n",
  1383. " color: #888;\n",
  1384. " white-space: nowrap;\n",
  1385. " font-size: 12px;\n",
  1386. "}\n",
  1387. "\n",
  1388. ".xr-values > span:nth-child(odd) {\n",
  1389. " color: rgba(0, 0, 0, .65);\n",
  1390. "}\n",
  1391. "\n",
  1392. "input.xr-values-in + label:hover > span {\n",
  1393. " color: #000;\n",
  1394. "}\n",
  1395. "\n",
  1396. "input.xr-values-in:checked + label > span {\n",
  1397. " color: #ccc;\n",
  1398. "}\n",
  1399. "\n",
  1400. "input.xr-values-in ~ pre {\n",
  1401. " display: none;\n",
  1402. " background-color: white;\n",
  1403. "}\n",
  1404. "\n",
  1405. "input.xr-values-in:checked ~ pre {\n",
  1406. " display: block;\n",
  1407. "}\n",
  1408. "\n",
  1409. "input.xr-values-in:checked + label > span {\n",
  1410. " color: #ccc;\n",
  1411. "}\n",
  1412. "\n",
  1413. ".xr-data-repr {\n",
  1414. " font-size: 11px !important;\n",
  1415. " background-color: #fff;\n",
  1416. " padding: 4px 0 6px 40px !important;\n",
  1417. " margin: 0 !important;\n",
  1418. "}\n",
  1419. "\n",
  1420. ".xr-attr-list {\n",
  1421. " list-style: none !important;\n",
  1422. " background-color: #fff;\n",
  1423. " padding: 0 0 6px 40px !important;\n",
  1424. " color: #555;\n",
  1425. "}\n",
  1426. "\n",
  1427. ".xr-attr-list li,\n",
  1428. ".xr-attr-list li:hover {\n",
  1429. " background-color: #fff;\n",
  1430. "}\n",
  1431. "</style><div class='xr-wrap'><div class='xr-header'><div class='xr-dataarray-cls'>xarray.IndexVariable</div><div class='xr-dataarray-name'>'x'</div><ul class='xr-dim-list'><li><span>x</span>: 3</li></ul></div><ul class='xr-sections'><li><input id='section-8ef2abce-c005-4948-b873-d202f27b46f6' class='xr-dataarray-in' type='checkbox' checked><label for='section-8ef2abce-c005-4948-b873-d202f27b46f6'></label><div><span>0 </span><span>1 </span><span>2 </span></div><pre>array([0, 1, 2])</pre></li><li><input id='section-94dfd6ca-b34e-454d-85b9-b3f6eb62ee5d' class='xr-section-in' type='checkbox' ><label for='section-94dfd6ca-b34e-454d-85b9-b3f6eb62ee5d'>Attributes: <span>(0)</span></label><ul class='xr-attr-list'></ul></li></ul></div></div>"
  1432. ],
  1433. "text/plain": [
  1434. "<xarray.IndexVariable 'x' (x: 3)>\n",
  1435. "array([0, 1, 2])"
  1436. ]
  1437. },
  1438. "execution_count": 6,
  1439. "metadata": {},
  1440. "output_type": "execute_result"
  1441. }
  1442. ],
  1443. "source": [
  1444. "ds.foo.x.variable"
  1445. ]
  1446. },
  1447. {
  1448. "cell_type": "code",
  1449. "execution_count": 7,
  1450. "metadata": {},
  1451. "outputs": [
  1452. {
  1453. "data": {
  1454. "text/html": [
  1455. "<div><style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
  1456. " *\n",
  1457. " */\n",
  1458. "\n",
  1459. ".xr-wrap {\n",
  1460. " width: 540px;\n",
  1461. " font-size: 13px;\n",
  1462. " line-height: 1.5;\n",
  1463. " background-color: #fff;\n",
  1464. "}\n",
  1465. "\n",
  1466. ".xr-wrap ul {\n",
  1467. " padding: 0;\n",
  1468. "}\n",
  1469. "\n",
  1470. ".xr-wrap input + label {\n",
  1471. " margin-bottom: 0 !important;\n",
  1472. "}\n",
  1473. "\n",
  1474. ".xr-header {\n",
  1475. " padding: 6px 0 6px 3px;\n",
  1476. " border-bottom-width: 1px;\n",
  1477. " border-bottom-style: solid;\n",
  1478. " border-bottom-color: #777;\n",
  1479. " color: #555;;\n",
  1480. "}\n",
  1481. "\n",
  1482. ".xr-header > div,\n",
  1483. ".xr-header > ul {\n",
  1484. " display: inline;\n",
  1485. " margin-top: 0;\n",
  1486. " margin-bottom: 0;\n",
  1487. "}\n",
  1488. "\n",
  1489. ".xr-dataarray-cls,\n",
  1490. ".xr-dataarray-name {\n",
  1491. " margin-left: 2px;\n",
  1492. " margin-right: 10px;\n",
  1493. "}\n",
  1494. "\n",
  1495. ".xr-dataarray-name {\n",
  1496. " color: #000;\n",
  1497. "}\n",
  1498. "\n",
  1499. "ul.xr-sections {\n",
  1500. " list-style: none !important;\n",
  1501. " padding: 3px !important;\n",
  1502. " margin: 0 !important;\n",
  1503. "}\n",
  1504. "\n",
  1505. "input.xr-section-in {\n",
  1506. " display: none;\n",
  1507. "}\n",
  1508. "\n",
  1509. "input.xr-section-in + label {\n",
  1510. " display: inline-block;\n",
  1511. " width: 140px;\n",
  1512. " color: #555;\n",
  1513. " font-weight: 500;\n",
  1514. " padding: 4px 0 2px 0;\n",
  1515. "}\n",
  1516. "\n",
  1517. "input.xr-section-in:enabled + label {\n",
  1518. " cursor: pointer;\n",
  1519. "}\n",
  1520. "\n",
  1521. "input.xr-section-in + label:before {\n",
  1522. " display: inline-block;\n",
  1523. " content: '►';\n",
  1524. " font-size: 11px;\n",
  1525. " width: 15px;\n",
  1526. " text-align: center;\n",
  1527. "}\n",
  1528. "\n",
  1529. "input.xr-section-in:checked + label:before {\n",
  1530. " content: '▼';\n",
  1531. "}\n",
  1532. "\n",
  1533. "input.xr-section-in:disabled + label:before {\n",
  1534. " color: #777;\n",
  1535. "}\n",
  1536. "\n",
  1537. "input.xr-section-in + label > span {\n",
  1538. " display: inline-block;\n",
  1539. " margin-left: 4px;\n",
  1540. "}\n",
  1541. "\n",
  1542. "input.xr-section-in:checked + label > span {\n",
  1543. " display: none;\n",
  1544. "}\n",
  1545. "\n",
  1546. "input.xr-section-in ~ ul {\n",
  1547. " display: none;\n",
  1548. "}\n",
  1549. "\n",
  1550. "input.xr-section-in:checked ~ ul {\n",
  1551. " display: block;\n",
  1552. "}\n",
  1553. "\n",
  1554. ".xr-sections summary > div {\n",
  1555. " display: inline-block;\n",
  1556. " cursor: pointer;\n",
  1557. " width: 140px;\n",
  1558. " color: #555;\n",
  1559. " font-weight: 500;\n",
  1560. " padding: 4px 0 2px 0;\n",
  1561. "}\n",
  1562. "\n",
  1563. ".xr-dim-list {\n",
  1564. " display: inline-block !important;\n",
  1565. " list-style: none;\n",
  1566. " padding: 0 !important;\n",
  1567. "}\n",
  1568. "\n",
  1569. ".xr-dim-list li {\n",
  1570. " display: inline-block;\n",
  1571. " font-size: 13px !important;\n",
  1572. " padding: 0;\n",
  1573. " margin: 0;\n",
  1574. "}\n",
  1575. "\n",
  1576. ".xr-dim-list:before {\n",
  1577. " content: '(';\n",
  1578. "}\n",
  1579. "\n",
  1580. ".xr-dim-list:after {\n",
  1581. " content: ')';\n",
  1582. "}\n",
  1583. "\n",
  1584. ".xr-dim-list li:not(:last-child):after {\n",
  1585. " content: ',';\n",
  1586. " padding-right: 5px;\n",
  1587. "}\n",
  1588. "\n",
  1589. ".xr-has-index {\n",
  1590. " text-decoration: underline;\n",
  1591. "}\n",
  1592. "\n",
  1593. "input.xr-dataarray-in {\n",
  1594. " display: none;\n",
  1595. "}\n",
  1596. "\n",
  1597. "input.xr-dataarray-in + label {\n",
  1598. " display: inline-block;\n",
  1599. " width: 15px !important;\n",
  1600. " vertical-align: top;\n",
  1601. " padding: 4px 0 2px 0 !important;\n",
  1602. "}\n",
  1603. "\n",
  1604. "input.xr-dataarray-in + label:before {\n",
  1605. " content: '➕' !important;\n",
  1606. "}\n",
  1607. "\n",
  1608. "input.xr-dataarray-in:checked + label:before {\n",
  1609. " content: '➖' !important;\n",
  1610. "}\n",
  1611. "\n",
  1612. "input.xr-dataarray-in:enabled + label {\n",
  1613. " cursor: pointer;\n",
  1614. "}\n",
  1615. "\n",
  1616. "input.xr-dataarray-in ~ pre,\n",
  1617. "input.xr-dataarray-in ~ div {\n",
  1618. " font-size: 12px;\n",
  1619. " width: 500px;\n",
  1620. " padding: 5px 0 4px 8px !important;\n",
  1621. " margin: 0;\n",
  1622. "}\n",
  1623. "\n",
  1624. "input.xr-dataarray-in ~ div > span {\n",
  1625. " display: inline-block;\n",
  1626. " margin-right: 4px;\n",
  1627. "}\n",
  1628. "\n",
  1629. "input.xr-dataarray-in ~ pre {\n",
  1630. " display: none;\n",
  1631. "}\n",
  1632. "\n",
  1633. "input.xr-dataarray-in:checked ~ pre {\n",
  1634. " display: inline-block;\n",
  1635. "}\n",
  1636. "\n",
  1637. "input.xr-dataarray-in ~ div {\n",
  1638. " display: inline-block;\n",
  1639. "}\n",
  1640. "\n",
  1641. "input.xr-dataarray-in:checked ~ div {\n",
  1642. " display: none;\n",
  1643. "}\n",
  1644. "\n",
  1645. "ul.xr-var-list {\n",
  1646. " list-style: none !important;\n",
  1647. " padding: 0 !important;\n",
  1648. " margin: 0 !important;\n",
  1649. "}\n",
  1650. "\n",
  1651. ".xr-var-list > li {\n",
  1652. " background-color: #fcfcfc;\n",
  1653. " overflow: hidden;\n",
  1654. "}\n",
  1655. "\n",
  1656. ".xr-var-list > li:nth-child(odd) {\n",
  1657. " background-color: #efefef;\n",
  1658. "}\n",
  1659. "\n",
  1660. ".xr-var-list li:hover {\n",
  1661. " background-color: rgba(3, 169, 244, .2);\n",
  1662. "}\n",
  1663. "\n",
  1664. ".xr-var-list li > span {\n",
  1665. " display: inline-block;\n",
  1666. "}\n",
  1667. "\n",
  1668. ".xr-var-list li input {\n",
  1669. " display: none;\n",
  1670. "}\n",
  1671. "\n",
  1672. ".xr-var-list li input:enabled + label {\n",
  1673. " cursor: pointer;\n",
  1674. "}\n",
  1675. "\n",
  1676. "input.xr-varname-in + label {\n",
  1677. " display: inline-block;\n",
  1678. " width: 140px;\n",
  1679. " padding-left: 0;\n",
  1680. "}\n",
  1681. "\n",
  1682. "input.xr-varname-in + label:before {\n",
  1683. " content: ' ';\n",
  1684. " display: inline-block;\n",
  1685. " font-size: 11px;\n",
  1686. " width: 15px;\n",
  1687. " margin-left: 20px;\n",
  1688. " margin-right: 5px;\n",
  1689. " text-align: center;\n",
  1690. " color: #aaa;\n",
  1691. " text-decoration: none !important;\n",
  1692. "}\n",
  1693. "\n",
  1694. "input.xr-varname-in ~ ul {\n",
  1695. " display: none;\n",
  1696. "}\n",
  1697. "\n",
  1698. "input.xr-varname-in:checked ~ ul {\n",
  1699. " display: block;\n",
  1700. "}\n",
  1701. "\n",
  1702. "input.xr-varname-in:enabled + label:before {\n",
  1703. " content: 'a';\n",
  1704. "}\n",
  1705. "\n",
  1706. "input.xr-varname-in:enabled + label:hover:before {\n",
  1707. " color: #000;\n",
  1708. "}\n",
  1709. "\n",
  1710. "input.xr-varname-in:checked + label:before {\n",
  1711. " color: #ccc;\n",
  1712. "}\n",
  1713. "\n",
  1714. ".xr-dims {\n",
  1715. " width: 80px;\n",
  1716. "}\n",
  1717. "\n",
  1718. ".xr-dtype {\n",
  1719. " width: 96px;\n",
  1720. " padding-right: 4px;\n",
  1721. " text-align: right;\n",
  1722. " color: #555;\n",
  1723. "}\n",
  1724. "\n",
  1725. ".xr-values {\n",
  1726. " width: 200px;\n",
  1727. " text-align: left;\n",
  1728. " color: #888;\n",
  1729. " white-space: nowrap;\n",
  1730. " font-size: 12px;\n",
  1731. "}\n",
  1732. "\n",
  1733. ".xr-values > span:nth-child(odd) {\n",
  1734. " color: rgba(0, 0, 0, .65);\n",
  1735. "}\n",
  1736. "\n",
  1737. "input.xr-values-in + label:hover > span {\n",
  1738. " color: #000;\n",
  1739. "}\n",
  1740. "\n",
  1741. "input.xr-values-in:checked + label > span {\n",
  1742. " color: #ccc;\n",
  1743. "}\n",
  1744. "\n",
  1745. "input.xr-values-in ~ pre {\n",
  1746. " display: none;\n",
  1747. " background-color: white;\n",
  1748. "}\n",
  1749. "\n",
  1750. "input.xr-values-in:checked ~ pre {\n",
  1751. " display: block;\n",
  1752. "}\n",
  1753. "\n",
  1754. "input.xr-values-in:checked + label > span {\n",
  1755. " color: #ccc;\n",
  1756. "}\n",
  1757. "\n",
  1758. ".xr-data-repr {\n",
  1759. " font-size: 11px !important;\n",
  1760. " background-color: #fff;\n",
  1761. " padding: 4px 0 6px 40px !important;\n",
  1762. " margin: 0 !important;\n",
  1763. "}\n",
  1764. "\n",
  1765. ".xr-attr-list {\n",
  1766. " list-style: none !important;\n",
  1767. " background-color: #fff;\n",
  1768. " padding: 0 0 6px 40px !important;\n",
  1769. " color: #555;\n",
  1770. "}\n",
  1771. "\n",
  1772. ".xr-attr-list li,\n",
  1773. ".xr-attr-list li:hover {\n",
  1774. " background-color: #fff;\n",
  1775. "}\n",
  1776. "</style><div class='xr-wrap'><div class='xr-header'><div class='xr-dataarray-cls'>xarray.DataArray</div><div class='xr-dataarray-name'>'lat'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>x</span>: 3</li><li><span class='xr-has-index'>y</span>: 3</li></ul></div><ul class='xr-sections'><li><input id='section-0c1e5055-f9c5-41dd-bd9a-646ce787128e' class='xr-dataarray-in' type='checkbox' checked><label for='section-0c1e5055-f9c5-41dd-bd9a-646ce787128e'></label><div><span>42.25 </span><span>42.21 </span><span>42.82 </span><span>42.91 </span><span>42.47 </span><span>42.71 </span><span>42.63 </span><span>42.59 </span><span>42.29 </span></div><pre>array([[ 42.25, 42.21, 42.82],\n",
  1777. " [ 42.91, 42.47, 42.71],\n",
  1778. " [ 42.63, 42.59, 42.29]])</pre></li><li><input id='section-dbfa5972-9ed5-4a8a-91ee-e8ae5d372ae1' class='xr-section-in' type='checkbox' checked><label for='section-dbfa5972-9ed5-4a8a-91ee-e8ae5d372ae1'>Coordinates: <span>(4)</span></label><ul class='xr-var-list'><li><input id='attrs-42ebc799-809b-4383-97b6-c74fb16d99cc' class='xr-varname-in' type='checkbox' disabled><label class='xr-varname xr-has-index' for='attrs-42ebc799-809b-4383-97b6-c74fb16d99cc'>x</label><span class='xr-dims'>(x)</span><span class='xr-dtype'>int64</span><input id='values-f7396c30-3ba6-42ed-abfc-09afda370d04' class='xr-values-in' type='checkbox'><label for='values-f7396c30-3ba6-42ed-abfc-09afda370d04' class='xr-values'><span>0 </span><span>1 </span><span>2 </span></label><ul class='xr-attr-list'></ul><pre class='xr-data-repr'>array([0, 1, 2])</pre></li><li><input id='attrs-64d951cd-fbb2-4d26-991c-dc79c7f7ff46' class='xr-varname-in' type='checkbox' disabled><label class='xr-varname xr-has-index' for='attrs-64d951cd-fbb2-4d26-991c-dc79c7f7ff46'>y</label><span class='xr-dims'>(y)</span><span class='xr-dtype'>int64</span><input id='values-0a616d4e-fefc-4a0b-adb4-dc3e5b73f8d0' class='xr-values-in' type='checkbox'><label for='values-0a616d4e-fefc-4a0b-adb4-dc3e5b73f8d0' class='xr-values'><span>0 </span><span>1 </span><span>2 </span></label><ul class='xr-attr-list'></ul><pre class='xr-data-repr'>array([0, 1, 2])</pre></li><li><input id='attrs-c33ce2d1-5391-4f75-98f8-bb9351570f81' class='xr-varname-in' type='checkbox' ><label class='xr-varname' for='attrs-c33ce2d1-5391-4f75-98f8-bb9351570f81'>lon</label><span class='xr-dims'>(x, y)</span><span class='xr-dtype'>float64</span><input id='values-b0dc454f-9935-419a-b762-22bc44455a5b' class='xr-values-in' type='checkbox'><label for='values-b0dc454f-9935-419a-b762-22bc44455a5b' class='xr-values'><span>-99.83 </span><span>-99.32 </span><span>-99.56 </span><span>-99.27 </span><span>... </span></label><ul class='xr-attr-list'><li>standard_name : longitude</li></ul><pre class='xr-data-repr'>array([[-99.83, -99.32, -99.56],\n",
  1779. " [-99.27, -99.39, -99.91],\n",
  1780. " [-99.79, -99.23, -99.42]])</pre></li><li><input id='attrs-be1d462a-0353-45e9-9153-2cb1da7e1391' class='xr-varname-in' type='checkbox' ><label class='xr-varname' for='attrs-be1d462a-0353-45e9-9153-2cb1da7e1391'>lat</label><span class='xr-dims'>(x, y)</span><span class='xr-dtype'>float64</span><input id='values-ded4580c-c813-4464-a35e-b5676f40f5eb' class='xr-values-in' type='checkbox'><label for='values-ded4580c-c813-4464-a35e-b5676f40f5eb' class='xr-values'><span>42.25 </span><span>42.21 </span><span>42.82 </span><span>42.91 </span><span>42.47 </span><span>... </span></label><ul class='xr-attr-list'><li>standard_name : latitude</li></ul><pre class='xr-data-repr'>array([[ 42.25, 42.21, 42.82],\n",
  1781. " [ 42.91, 42.47, 42.71],\n",
  1782. " [ 42.63, 42.59, 42.29]])</pre></li></ul></li><li><input id='section-26549644-8d86-4f09-89d8-0252959128ad' class='xr-section-in' type='checkbox' checked><label for='section-26549644-8d86-4f09-89d8-0252959128ad'>Attributes: <span>(1)</span></label><ul class='xr-attr-list'><li>standard_name : latitude</li></ul></li></ul></div></div>"
  1783. ],
  1784. "text/plain": [
  1785. "<xarray.DataArray 'lat' (x: 3, y: 3)>\n",
  1786. "array([[ 42.25, 42.21, 42.82],\n",
  1787. " [ 42.91, 42.47, 42.71],\n",
  1788. " [ 42.63, 42.59, 42.29]])\n",
  1789. "Coordinates:\n",
  1790. " * x (x) int64 0 1 2\n",
  1791. " * y (y) int64 0 1 2\n",
  1792. " lon (x, y) float64 -99.83 -99.32 -99.56 -99.27 -99.39 -99.91 -99.79 ...\n",
  1793. " lat (x, y) float64 42.25 42.21 42.82 42.91 42.47 42.71 42.63 42.59 ...\n",
  1794. "Attributes:\n",
  1795. " standard_name: latitude"
  1796. ]
  1797. },
  1798. "execution_count": 7,
  1799. "metadata": {},
  1800. "output_type": "execute_result"
  1801. }
  1802. ],
  1803. "source": [
  1804. "ds.foo.lat"
  1805. ]
  1806. },
  1807. {
  1808. "cell_type": "code",
  1809. "execution_count": 8,
  1810. "metadata": {},
  1811. "outputs": [
  1812. {
  1813. "data": {
  1814. "text/html": [
  1815. "<div><style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
  1816. " *\n",
  1817. " */\n",
  1818. "\n",
  1819. ".xr-wrap {\n",
  1820. " width: 540px;\n",
  1821. " font-size: 13px;\n",
  1822. " line-height: 1.5;\n",
  1823. " background-color: #fff;\n",
  1824. "}\n",
  1825. "\n",
  1826. ".xr-wrap ul {\n",
  1827. " padding: 0;\n",
  1828. "}\n",
  1829. "\n",
  1830. ".xr-wrap input + label {\n",
  1831. " margin-bottom: 0 !important;\n",
  1832. "}\n",
  1833. "\n",
  1834. ".xr-header {\n",
  1835. " padding: 6px 0 6px 3px;\n",
  1836. " border-bottom-width: 1px;\n",
  1837. " border-bottom-style: solid;\n",
  1838. " border-bottom-color: #777;\n",
  1839. " color: #555;;\n",
  1840. "}\n",
  1841. "\n",
  1842. ".xr-header > div,\n",
  1843. ".xr-header > ul {\n",
  1844. " display: inline;\n",
  1845. " margin-top: 0;\n",
  1846. " margin-bottom: 0;\n",
  1847. "}\n",
  1848. "\n",
  1849. ".xr-dataarray-cls,\n",
  1850. ".xr-dataarray-name {\n",
  1851. " margin-left: 2px;\n",
  1852. " margin-right: 10px;\n",
  1853. "}\n",
  1854. "\n",
  1855. ".xr-dataarray-name {\n",
  1856. " color: #000;\n",
  1857. "}\n",
  1858. "\n",
  1859. "ul.xr-sections {\n",
  1860. " list-style: none !important;\n",
  1861. " padding: 3px !important;\n",
  1862. " margin: 0 !important;\n",
  1863. "}\n",
  1864. "\n",
  1865. "input.xr-section-in {\n",
  1866. " display: none;\n",
  1867. "}\n",
  1868. "\n",
  1869. "input.xr-section-in + label {\n",
  1870. " display: inline-block;\n",
  1871. " width: 140px;\n",
  1872. " color: #555;\n",
  1873. " font-weight: 500;\n",
  1874. " padding: 4px 0 2px 0;\n",
  1875. "}\n",
  1876. "\n",
  1877. "input.xr-section-in:enabled + label {\n",
  1878. " cursor: pointer;\n",
  1879. "}\n",
  1880. "\n",
  1881. "input.xr-section-in + label:before {\n",
  1882. " display: inline-block;\n",
  1883. " content: '►';\n",
  1884. " font-size: 11px;\n",
  1885. " width: 15px;\n",
  1886. " text-align: center;\n",
  1887. "}\n",
  1888. "\n",
  1889. "input.xr-section-in:checked + label:before {\n",
  1890. " content: '▼';\n",
  1891. "}\n",
  1892. "\n",
  1893. "input.xr-section-in:disabled + label:before {\n",
  1894. " color: #777;\n",
  1895. "}\n",
  1896. "\n",
  1897. "input.xr-section-in + label > span {\n",
  1898. " display: inline-block;\n",
  1899. " margin-left: 4px;\n",
  1900. "}\n",
  1901. "\n",
  1902. "input.xr-section-in:checked + label > span {\n",
  1903. " display: none;\n",
  1904. "}\n",
  1905. "\n",
  1906. "input.xr-section-in ~ ul {\n",
  1907. " display: none;\n",
  1908. "}\n",
  1909. "\n",
  1910. "input.xr-section-in:checked ~ ul {\n",
  1911. " display: block;\n",
  1912. "}\n",
  1913. "\n",
  1914. ".xr-sections summary > div {\n",
  1915. " display: inline-block;\n",
  1916. " cursor: pointer;\n",
  1917. " width: 140px;\n",
  1918. " color: #555;\n",
  1919. " font-weight: 500;\n",
  1920. " padding: 4px 0 2px 0;\n",
  1921. "}\n",
  1922. "\n",
  1923. ".xr-dim-list {\n",
  1924. " display: inline-block !important;\n",
  1925. " list-style: none;\n",
  1926. " padding: 0 !important;\n",
  1927. "}\n",
  1928. "\n",
  1929. ".xr-dim-list li {\n",
  1930. " display: inline-block;\n",
  1931. " font-size: 13px !important;\n",
  1932. " padding: 0;\n",
  1933. " margin: 0;\n",
  1934. "}\n",
  1935. "\n",
  1936. ".xr-dim-list:before {\n",
  1937. " content: '(';\n",
  1938. "}\n",
  1939. "\n",
  1940. ".xr-dim-list:after {\n",
  1941. " content: ')';\n",
  1942. "}\n",
  1943. "\n",
  1944. ".xr-dim-list li:not(:last-child):after {\n",
  1945. " content: ',';\n",
  1946. " padding-right: 5px;\n",
  1947. "}\n",
  1948. "\n",
  1949. ".xr-has-index {\n",
  1950. " text-decoration: underline;\n",
  1951. "}\n",
  1952. "\n",
  1953. "input.xr-dataarray-in {\n",
  1954. " display: none;\n",
  1955. "}\n",
  1956. "\n",
  1957. "input.xr-dataarray-in + label {\n",
  1958. " display: inline-block;\n",
  1959. " width: 15px !important;\n",
  1960. " vertical-align: top;\n",
  1961. " padding: 4px 0 2px 0 !important;\n",
  1962. "}\n",
  1963. "\n",
  1964. "input.xr-dataarray-in + label:before {\n",
  1965. " content: '➕' !important;\n",
  1966. "}\n",
  1967. "\n",
  1968. "input.xr-dataarray-in:checked + label:before {\n",
  1969. " content: '➖' !important;\n",
  1970. "}\n",
  1971. "\n",
  1972. "input.xr-dataarray-in:enabled + label {\n",
  1973. " cursor: pointer;\n",
  1974. "}\n",
  1975. "\n",
  1976. "input.xr-dataarray-in ~ pre,\n",
  1977. "input.xr-dataarray-in ~ div {\n",
  1978. " font-size: 12px;\n",
  1979. " width: 500px;\n",
  1980. " padding: 5px 0 4px 8px !important;\n",
  1981. " margin: 0;\n",
  1982. "}\n",
  1983. "\n",
  1984. "input.xr-dataarray-in ~ div > span {\n",
  1985. " display: inline-block;\n",
  1986. " margin-right: 4px;\n",
  1987. "}\n",
  1988. "\n",
  1989. "input.xr-dataarray-in ~ pre {\n",
  1990. " display: none;\n",
  1991. "}\n",
  1992. "\n",
  1993. "input.xr-dataarray-in:checked ~ pre {\n",
  1994. " display: inline-block;\n",
  1995. "}\n",
  1996. "\n",
  1997. "input.xr-dataarray-in ~ div {\n",
  1998. " display: inline-block;\n",
  1999. "}\n",
  2000. "\n",
  2001. "input.xr-dataarray-in:checked ~ div {\n",
  2002. " display: none;\n",
  2003. "}\n",
  2004. "\n",
  2005. "ul.xr-var-list {\n",
  2006. " list-style: none !important;\n",
  2007. " padding: 0 !important;\n",
  2008. " margin: 0 !important;\n",
  2009. "}\n",
  2010. "\n",
  2011. ".xr-var-list > li {\n",
  2012. " background-color: #fcfcfc;\n",
  2013. " overflow: hidden;\n",
  2014. "}\n",
  2015. "\n",
  2016. ".xr-var-list > li:nth-child(odd) {\n",
  2017. " background-color: #efefef;\n",
  2018. "}\n",
  2019. "\n",
  2020. ".xr-var-list li:hover {\n",
  2021. " background-color: rgba(3, 169, 244, .2);\n",
  2022. "}\n",
  2023. "\n",
  2024. ".xr-var-list li > span {\n",
  2025. " display: inline-block;\n",
  2026. "}\n",
  2027. "\n",
  2028. ".xr-var-list li input {\n",
  2029. " display: none;\n",
  2030. "}\n",
  2031. "\n",
  2032. ".xr-var-list li input:enabled + label {\n",
  2033. " cursor: pointer;\n",
  2034. "}\n",
  2035. "\n",
  2036. "input.xr-varname-in + label {\n",
  2037. " display: inline-block;\n",
  2038. " width: 140px;\n",
  2039. " padding-left: 0;\n",
  2040. "}\n",
  2041. "\n",
  2042. "input.xr-varname-in + label:before {\n",
  2043. " content: ' ';\n",
  2044. " display: inline-block;\n",
  2045. " font-size: 11px;\n",
  2046. " width: 15px;\n",
  2047. " margin-left: 20px;\n",
  2048. " margin-right: 5px;\n",
  2049. " text-align: center;\n",
  2050. " color: #aaa;\n",
  2051. " text-decoration: none !important;\n",
  2052. "}\n",
  2053. "\n",
  2054. "input.xr-varname-in ~ ul {\n",
  2055. " display: none;\n",
  2056. "}\n",
  2057. "\n",
  2058. "input.xr-varname-in:checked ~ ul {\n",
  2059. " display: block;\n",
  2060. "}\n",
  2061. "\n",
  2062. "input.xr-varname-in:enabled + label:before {\n",
  2063. " content: 'a';\n",
  2064. "}\n",
  2065. "\n",
  2066. "input.xr-varname-in:enabled + label:hover:before {\n",
  2067. " color: #000;\n",
  2068. "}\n",
  2069. "\n",
  2070. "input.xr-varname-in:checked + label:before {\n",
  2071. " color: #ccc;\n",
  2072. "}\n",
  2073. "\n",
  2074. ".xr-dims {\n",
  2075. " width: 80px;\n",
  2076. "}\n",
  2077. "\n",
  2078. ".xr-dtype {\n",
  2079. " width: 96px;\n",
  2080. " padding-right: 4px;\n",
  2081. " text-align: right;\n",
  2082. " color: #555;\n",
  2083. "}\n",
  2084. "\n",
  2085. ".xr-values {\n",
  2086. " width: 200px;\n",
  2087. " text-align: left;\n",
  2088. " color: #888;\n",
  2089. " white-space: nowrap;\n",
  2090. " font-size: 12px;\n",
  2091. "}\n",
  2092. "\n",
  2093. ".xr-values > span:nth-child(odd) {\n",
  2094. " color: rgba(0, 0, 0, .65);\n",
  2095. "}\n",
  2096. "\n",
  2097. "input.xr-values-in + label:hover > span {\n",
  2098. " color: #000;\n",
  2099. "}\n",
  2100. "\n",
  2101. "input.xr-values-in:checked + label > span {\n",
  2102. " color: #ccc;\n",
  2103. "}\n",
  2104. "\n",
  2105. "input.xr-values-in ~ pre {\n",
  2106. " display: none;\n",
  2107. " background-color: white;\n",
  2108. "}\n",
  2109. "\n",
  2110. "input.xr-values-in:checked ~ pre {\n",
  2111. " display: block;\n",
  2112. "}\n",
  2113. "\n",
  2114. "input.xr-values-in:checked + label > span {\n",
  2115. " color: #ccc;\n",
  2116. "}\n",
  2117. "\n",
  2118. ".xr-data-repr {\n",
  2119. " font-size: 11px !important;\n",
  2120. " background-color: #fff;\n",
  2121. " padding: 4px 0 6px 40px !important;\n",
  2122. " margin: 0 !important;\n",
  2123. "}\n",
  2124. "\n",
  2125. ".xr-attr-list {\n",
  2126. " list-style: none !important;\n",
  2127. " background-color: #fff;\n",
  2128. " padding: 0 0 6px 40px !important;\n",
  2129. " color: #555;\n",
  2130. "}\n",
  2131. "\n",
  2132. ".xr-attr-list li,\n",
  2133. ".xr-attr-list li:hover {\n",
  2134. " background-color: #fff;\n",
  2135. "}\n",
  2136. "</style><div class='xr-wrap'><div class='xr-header'>xarray.Dataset</div><ul class='xr-sections'><li><input id='section-7f14f66f-7a84-4b71-b100-196c1a9a0f5f' class='xr-section-in' type='checkbox' disabled ><label for='section-7f14f66f-7a84-4b71-b100-196c1a9a0f5f'>Dimensions:</label></li><li><input id='section-746ca663-8da3-44b5-b4bf-6612da9a2e9e' class='xr-section-in' type='checkbox' ><label for='section-746ca663-8da3-44b5-b4bf-6612da9a2e9e'>Coordinates: <span>(0)</span></label><ul class='xr-var-list'></ul></li><li><input id='section-27f258c3-083b-4314-acb4-68728d3fbeb2' class='xr-section-in' type='checkbox' ><label for='section-27f258c3-083b-4314-acb4-68728d3fbeb2'>Data variables: <span>(0)</span></label><ul class='xr-var-list'></ul></li><li><input id='section-9e678132-7201-48a5-9ad0-8acb3984c34d' class='xr-section-in' type='checkbox' ><label for='section-9e678132-7201-48a5-9ad0-8acb3984c34d'>Attributes: <span>(0)</span></label><ul class='xr-attr-list'></ul></li></ul></div></div>"
  2137. ],
  2138. "text/plain": [
  2139. "<xarray.Dataset>\n",
  2140. "Dimensions: ()\n",
  2141. "Data variables:\n",
  2142. " *empty*"
  2143. ]
  2144. },
  2145. "execution_count": 8,
  2146. "metadata": {},
  2147. "output_type": "execute_result"
  2148. }
  2149. ],
  2150. "source": [
  2151. "xr.Dataset()"
  2152. ]
  2153. },
  2154. {
  2155. "cell_type": "code",
  2156. "execution_count": 9,
  2157. "metadata": {},
  2158. "outputs": [
  2159. {
  2160. "data": {
  2161. "text/html": [
  2162. "<div><style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
  2163. " *\n",
  2164. " */\n",
  2165. "\n",
  2166. ".xr-wrap {\n",
  2167. " width: 540px;\n",
  2168. " font-size: 13px;\n",
  2169. " line-height: 1.5;\n",
  2170. " background-color: #fff;\n",
  2171. "}\n",
  2172. "\n",
  2173. ".xr-wrap ul {\n",
  2174. " padding: 0;\n",
  2175. "}\n",
  2176. "\n",
  2177. ".xr-wrap input + label {\n",
  2178. " margin-bottom: 0 !important;\n",
  2179. "}\n",
  2180. "\n",
  2181. ".xr-header {\n",
  2182. " padding: 6px 0 6px 3px;\n",
  2183. " border-bottom-width: 1px;\n",
  2184. " border-bottom-style: solid;\n",
  2185. " border-bottom-color: #777;\n",
  2186. " color: #555;;\n",
  2187. "}\n",
  2188. "\n",
  2189. ".xr-header > div,\n",
  2190. ".xr-header > ul {\n",
  2191. " display: inline;\n",
  2192. " margin-top: 0;\n",
  2193. " margin-bottom: 0;\n",
  2194. "}\n",
  2195. "\n",
  2196. ".xr-dataarray-cls,\n",
  2197. ".xr-dataarray-name {\n",
  2198. " margin-left: 2px;\n",
  2199. " margin-right: 10px;\n",
  2200. "}\n",
  2201. "\n",
  2202. ".xr-dataarray-name {\n",
  2203. " color: #000;\n",
  2204. "}\n",
  2205. "\n",
  2206. "ul.xr-sections {\n",
  2207. " list-style: none !important;\n",
  2208. " padding: 3px !important;\n",
  2209. " margin: 0 !important;\n",
  2210. "}\n",
  2211. "\n",
  2212. "input.xr-section-in {\n",
  2213. " display: none;\n",
  2214. "}\n",
  2215. "\n",
  2216. "input.xr-section-in + label {\n",
  2217. " display: inline-block;\n",
  2218. " width: 140px;\n",
  2219. " color: #555;\n",
  2220. " font-weight: 500;\n",
  2221. " padding: 4px 0 2px 0;\n",
  2222. "}\n",
  2223. "\n",
  2224. "input.xr-section-in:enabled + label {\n",
  2225. " cursor: pointer;\n",
  2226. "}\n",
  2227. "\n",
  2228. "input.xr-section-in + label:before {\n",
  2229. " display: inline-block;\n",
  2230. " content: '►';\n",
  2231. " font-size: 11px;\n",
  2232. " width: 15px;\n",
  2233. " text-align: center;\n",
  2234. "}\n",
  2235. "\n",
  2236. "input.xr-section-in:checked + label:before {\n",
  2237. " content: '▼';\n",
  2238. "}\n",
  2239. "\n",
  2240. "input.xr-section-in:disabled + label:before {\n",
  2241. " color: #777;\n",
  2242. "}\n",
  2243. "\n",
  2244. "input.xr-section-in + label > span {\n",
  2245. " display: inline-block;\n",
  2246. " margin-left: 4px;\n",
  2247. "}\n",
  2248. "\n",
  2249. "input.xr-section-in:checked + label > span {\n",
  2250. " display: none;\n",
  2251. "}\n",
  2252. "\n",
  2253. "input.xr-section-in ~ ul {\n",
  2254. " display: none;\n",
  2255. "}\n",
  2256. "\n",
  2257. "input.xr-section-in:checked ~ ul {\n",
  2258. " display: block;\n",
  2259. "}\n",
  2260. "\n",
  2261. ".xr-sections summary > div {\n",
  2262. " display: inline-block;\n",
  2263. " cursor: pointer;\n",
  2264. " width: 140px;\n",
  2265. " color: #555;\n",
  2266. " font-weight: 500;\n",
  2267. " padding: 4px 0 2px 0;\n",
  2268. "}\n",
  2269. "\n",
  2270. ".xr-dim-list {\n",
  2271. " display: inline-block !important;\n",
  2272. " list-style: none;\n",
  2273. " padding: 0 !important;\n",
  2274. "}\n",
  2275. "\n",
  2276. ".xr-dim-list li {\n",
  2277. " display: inline-block;\n",
  2278. " font-size: 13px !important;\n",
  2279. " padding: 0;\n",
  2280. " margin: 0;\n",
  2281. "}\n",
  2282. "\n",
  2283. ".xr-dim-list:before {\n",
  2284. " content: '(';\n",
  2285. "}\n",
  2286. "\n",
  2287. ".xr-dim-list:after {\n",
  2288. " content: ')';\n",
  2289. "}\n",
  2290. "\n",
  2291. ".xr-dim-list li:not(:last-child):after {\n",
  2292. " content: ',';\n",
  2293. " padding-right: 5px;\n",
  2294. "}\n",
  2295. "\n",
  2296. ".xr-has-index {\n",
  2297. " text-decoration: underline;\n",
  2298. "}\n",
  2299. "\n",
  2300. "input.xr-dataarray-in {\n",
  2301. " display: none;\n",
  2302. "}\n",
  2303. "\n",
  2304. "input.xr-dataarray-in + label {\n",
  2305. " display: inline-block;\n",
  2306. " width: 15px !important;\n",
  2307. " vertical-align: top;\n",
  2308. " padding: 4px 0 2px 0 !important;\n",
  2309. "}\n",
  2310. "\n",
  2311. "input.xr-dataarray-in + label:before {\n",
  2312. " content: '➕' !important;\n",
  2313. "}\n",
  2314. "\n",
  2315. "input.xr-dataarray-in:checked + label:before {\n",
  2316. " content: '➖' !important;\n",
  2317. "}\n",
  2318. "\n",
  2319. "input.xr-dataarray-in:enabled + label {\n",
  2320. " cursor: pointer;\n",
  2321. "}\n",
  2322. "\n",
  2323. "input.xr-dataarray-in ~ pre,\n",
  2324. "input.xr-dataarray-in ~ div {\n",
  2325. " font-size: 12px;\n",
  2326. " width: 500px;\n",
  2327. " padding: 5px 0 4px 8px !important;\n",
  2328. " margin: 0;\n",
  2329. "}\n",
  2330. "\n",
  2331. "input.xr-dataarray-in ~ div > span {\n",
  2332. " display: inline-block;\n",
  2333. " margin-right: 4px;\n",
  2334. "}\n",
  2335. "\n",
  2336. "input.xr-dataarray-in ~ pre {\n",
  2337. " display: none;\n",
  2338. "}\n",
  2339. "\n",
  2340. "input.xr-dataarray-in:checked ~ pre {\n",
  2341. " display: inline-block;\n",
  2342. "}\n",
  2343. "\n",
  2344. "input.xr-dataarray-in ~ div {\n",
  2345. " display: inline-block;\n",
  2346. "}\n",
  2347. "\n",
  2348. "input.xr-dataarray-in:checked ~ div {\n",
  2349. " display: none;\n",
  2350. "}\n",
  2351. "\n",
  2352. "ul.xr-var-list {\n",
  2353. " list-style: none !important;\n",
  2354. " padding: 0 !important;\n",
  2355. " margin: 0 !important;\n",
  2356. "}\n",
  2357. "\n",
  2358. ".xr-var-list > li {\n",
  2359. " background-color: #fcfcfc;\n",
  2360. " overflow: hidden;\n",
  2361. "}\n",
  2362. "\n",
  2363. ".xr-var-list > li:nth-child(odd) {\n",
  2364. " background-color: #efefef;\n",
  2365. "}\n",
  2366. "\n",
  2367. ".xr-var-list li:hover {\n",
  2368. " background-color: rgba(3, 169, 244, .2);\n",
  2369. "}\n",
  2370. "\n",
  2371. ".xr-var-list li > span {\n",
  2372. " display: inline-block;\n",
  2373. "}\n",
  2374. "\n",
  2375. ".xr-var-list li input {\n",
  2376. " display: none;\n",
  2377. "}\n",
  2378. "\n",
  2379. ".xr-var-list li input:enabled + label {\n",
  2380. " cursor: pointer;\n",
  2381. "}\n",
  2382. "\n",
  2383. "input.xr-varname-in + label {\n",
  2384. " display: inline-block;\n",
  2385. " width: 140px;\n",
  2386. " padding-left: 0;\n",
  2387. "}\n",
  2388. "\n",
  2389. "input.xr-varname-in + label:before {\n",
  2390. " content: ' ';\n",
  2391. " display: inline-block;\n",
  2392. " font-size: 11px;\n",
  2393. " width: 15px;\n",
  2394. " margin-left: 20px;\n",
  2395. " margin-right: 5px;\n",
  2396. " text-align: center;\n",
  2397. " color: #aaa;\n",
  2398. " text-decoration: none !important;\n",
  2399. "}\n",
  2400. "\n",
  2401. "input.xr-varname-in ~ ul {\n",
  2402. " display: none;\n",
  2403. "}\n",
  2404. "\n",
  2405. "input.xr-varname-in:checked ~ ul {\n",
  2406. " display: block;\n",
  2407. "}\n",
  2408. "\n",
  2409. "input.xr-varname-in:enabled + label:before {\n",
  2410. " content: 'a';\n",
  2411. "}\n",
  2412. "\n",
  2413. "input.xr-varname-in:enabled + label:hover:before {\n",
  2414. " color: #000;\n",
  2415. "}\n",
  2416. "\n",
  2417. "input.xr-varname-in:checked + label:before {\n",
  2418. " color: #ccc;\n",
  2419. "}\n",
  2420. "\n",
  2421. ".xr-dims {\n",
  2422. " width: 80px;\n",
  2423. "}\n",
  2424. "\n",
  2425. ".xr-dtype {\n",
  2426. " width: 96px;\n",
  2427. " padding-right: 4px;\n",
  2428. " text-align: right;\n",
  2429. " color: #555;\n",
  2430. "}\n",
  2431. "\n",
  2432. ".xr-values {\n",
  2433. " width: 200px;\n",
  2434. " text-align: left;\n",
  2435. " color: #888;\n",
  2436. " white-space: nowrap;\n",
  2437. " font-size: 12px;\n",
  2438. "}\n",
  2439. "\n",
  2440. ".xr-values > span:nth-child(odd) {\n",
  2441. " color: rgba(0, 0, 0, .65);\n",
  2442. "}\n",
  2443. "\n",
  2444. "input.xr-values-in + label:hover > span {\n",
  2445. " color: #000;\n",
  2446. "}\n",
  2447. "\n",
  2448. "input.xr-values-in:checked + label > span {\n",
  2449. " color: #ccc;\n",
  2450. "}\n",
  2451. "\n",
  2452. "input.xr-values-in ~ pre {\n",
  2453. " display: none;\n",
  2454. " background-color: white;\n",
  2455. "}\n",
  2456. "\n",
  2457. "input.xr-values-in:checked ~ pre {\n",
  2458. " display: block;\n",
  2459. "}\n",
  2460. "\n",
  2461. "input.xr-values-in:checked + label > span {\n",
  2462. " color: #ccc;\n",
  2463. "}\n",
  2464. "\n",
  2465. ".xr-data-repr {\n",
  2466. " font-size: 11px !important;\n",
  2467. " background-color: #fff;\n",
  2468. " padding: 4px 0 6px 40px !important;\n",
  2469. " margin: 0 !important;\n",
  2470. "}\n",
  2471. "\n",
  2472. ".xr-attr-list {\n",
  2473. " list-style: none !important;\n",
  2474. " background-color: #fff;\n",
  2475. " padding: 0 0 6px 40px !important;\n",
  2476. " color: #555;\n",
  2477. "}\n",
  2478. "\n",
  2479. ".xr-attr-list li,\n",
  2480. ".xr-attr-list li:hover {\n",
  2481. " background-color: #fff;\n",
  2482. "}\n",
  2483. "</style><div class='xr-wrap'><div class='xr-header'><div class='xr-dataarray-cls'>xarray.DataArray</div><div class='xr-dataarray-name'></div></div><ul class='xr-sections'><li><input id='section-97512db6-e0d9-4560-9f07-ee1e78cfd08d' class='xr-dataarray-in' type='checkbox' checked><label for='section-97512db6-e0d9-4560-9f07-ee1e78cfd08d'></label><div><span>1 </span></div><pre>array(1)</pre></li><li><input id='section-c9639b53-e3cd-43da-9a23-8bf6c0fb7bb4' class='xr-section-in' type='checkbox' ><label for='section-c9639b53-e3cd-43da-9a23-8bf6c0fb7bb4'>Coordinates: <span>(0)</span></label><ul class='xr-var-list'></ul></li><li><input id='section-c70264a0-e761-4565-814b-7ea22e2f3ec5' class='xr-section-in' type='checkbox' ><label for='section-c70264a0-e761-4565-814b-7ea22e2f3ec5'>Attributes: <span>(0)</span></label><ul class='xr-attr-list'></ul></li></ul></div></div>"
  2484. ],
  2485. "text/plain": [
  2486. "<xarray.DataArray ()>\n",
  2487. "array(1)"
  2488. ]
  2489. },
  2490. "execution_count": 9,
  2491. "metadata": {},
  2492. "output_type": "execute_result"
  2493. }
  2494. ],
  2495. "source": [
  2496. "xr.DataArray(1)"
  2497. ]
  2498. },
  2499. {
  2500. "cell_type": "code",
  2501. "execution_count": null,
  2502. "metadata": {},
  2503. "outputs": [],
  2504. "source": []
  2505. }
  2506. ],
  2507. "metadata": {
  2508. "kernelspec": {
  2509. "display_name": "Python [conda env:xarray_dev_py36]",
  2510. "language": "python",
  2511. "name": "conda-env-xarray_dev_py36-py"
  2512. },
  2513. "language_info": {
  2514. "codemirror_mode": {
  2515. "name": "ipython",
  2516. "version": 3
  2517. },
  2518. "file_extension": ".py",
  2519. "mimetype": "text/x-python",
  2520. "name": "python",
  2521. "nbconvert_exporter": "python",
  2522. "pygments_lexer": "ipython3",
  2523. "version": "3.6.3"
  2524. }
  2525. },
  2526. "nbformat": 4,
  2527. "nbformat_minor": 2
  2528. }
Add Comment
Please, Sign In to add comment