diff --git a/docs/source/changelog.md b/docs/source/changelog.md index 2ee88cb..32dcde7 100644 --- a/docs/source/changelog.md +++ b/docs/source/changelog.md @@ -1,6 +1,6 @@ # Change Log -## v0.x.x (Unreleased) +## v0.4.0 (2022 Dec 9) ### New features * Add `multivariate_normal` distribution class {pull}`23` diff --git a/docs/source/tutorials/einops-basics-port.ipynb b/docs/source/tutorials/einops-basics-port.ipynb index cf357ef..e28bba2 100644 --- a/docs/source/tutorials/einops-basics-port.ipynb +++ b/docs/source/tutorials/einops-basics-port.ipynb @@ -112,6 +112,7 @@ "}\n", "\n", "html[theme=dark],\n", + "body[data-theme=dark],\n", "body.vscode-dark {\n", " --xr-font-color0: rgba(255, 255, 255, 1);\n", " --xr-font-color2: rgba(255, 255, 255, 0.54);\n", @@ -341,6 +342,11 @@ " grid-column: 4;\n", "}\n", "\n", + ".xr-index-preview {\n", + " grid-column: 2 / 5;\n", + " color: var(--xr-font-color2);\n", + "}\n", + "\n", ".xr-var-name,\n", ".xr-var-dims,\n", ".xr-var-dtype,\n", @@ -362,14 +368,16 @@ "}\n", "\n", ".xr-var-attrs,\n", - ".xr-var-data {\n", + ".xr-var-data,\n", + ".xr-index-data {\n", " display: none;\n", " background-color: var(--xr-background-color) !important;\n", " padding-bottom: 5px !important;\n", "}\n", "\n", ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", - ".xr-var-data-in:checked ~ .xr-var-data {\n", + ".xr-var-data-in:checked ~ .xr-var-data,\n", + ".xr-index-data-in:checked ~ .xr-index-data {\n", " display: block;\n", "}\n", "\n", @@ -379,13 +387,16 @@ "\n", ".xr-var-name span,\n", ".xr-var-data,\n", + ".xr-index-name div,\n", + ".xr-index-data,\n", ".xr-attrs {\n", " padding-left: 25px !important;\n", "}\n", "\n", ".xr-attrs,\n", ".xr-var-attrs,\n", - ".xr-var-data {\n", + ".xr-var-data,\n", + ".xr-index-data {\n", " grid-column: 1 / -1;\n", "}\n", "\n", @@ -423,7 +434,8 @@ "}\n", "\n", ".xr-icon-database,\n", - ".xr-icon-file-text2 {\n", + ".xr-icon-file-text2,\n", + ".xr-no-icon {\n", " display: inline-block;\n", " vertical-align: middle;\n", " width: 1em;\n", @@ -436,7 +448,7 @@ "Dimensions: (batch: 6, height: 96, width: 96, channel: 3)\n", "Dimensions without coordinates: batch, height, width, channel\n", "Data variables:\n", - " ims (batch, height, width, channel) float64 1.0 0.902 ... 1.0 0.8039
<xarray.DataArray (batch: 10, experiment: 3, dim: 4, dim2: 4)>\n", "0.7075 1.025 0.5685 0.8951 0.2065 3.384 ... 1.239 0.4527 0.5749 0.4766 0.859\n", - "Dimensions without coordinates: batch, experiment, dim, dim2
<xarray.DataArray (batch: 10, experiment: 3)>\n", "4.854 4.74 4.457 2.637 2.79 3.163 1.998 ... 2.804 4.58 2.888 4.936 5.983 4.07\n", - "Dimensions without coordinates: batch, experiment
<xarray.DataArray (batch: 10, experiment: 3, dim: 4, dim2: 4)>\n", "11.26 -2.363 -10.84 -0.2744 10.99 -2.017 ... -3.444 0.7703 0.316 0.01949 -1.162\n", - "Dimensions without coordinates: batch, experiment, dim, dim2
<xarray.DataArray (batch: 10, experiment: 3, dim: 4, dim2: 4)>\n", "-0.5452 0.01652 -0.5624 -0.6214 -0.1592 ... -0.3322 -0.4013 0.2607 0.8128\n", - "Dimensions without coordinates: batch, experiment, dim, dim2
<xarray.DataArray (batch: 10, experiment: 3, dim: 4, dim2: 4)>\n", "-1.298 -1.975 -1.858 -1.228 0.0 -3.137 ... -0.4307 1.052 0.0 0.0 0.0 -0.6995\n", - "Dimensions without coordinates: batch, experiment, dim, dim2
<xarray.DataArray (batch: 10, experiment: 3, dim: 4, dim2: 4)>\n", "1.845 5.326 2.407 3.89 3.378 14.68 5.449 ... 5.586 6.55 1.279 1.373 1.791 2.658\n", - "Dimensions without coordinates: batch, experiment, dim, dim2
<xarray.DataArray (dim: 4, dim2_bis: 4, batch_bis: 10, batch: 10, dim2: 4)>\n", "10.79 3.926 1.503 3.986 0.1886 0.1844 ... 1.289 4.187 5.251 3.372 2.81 13.1\n", - "Dimensions without coordinates: dim, dim2_bis, batch_bis, batch, dim2
<xarray.DataArray (dim: 4, dim2: 4, batch: 10, batch2: 10)>\n", "10.79 0.1886 5.402 1.471 1.243 5.348 2.639 ... 3.462 3.618 11.21 9.47 4.187 13.1\n", - "Dimensions without coordinates: dim, dim2, batch, batch2
<xarray.DataArray (batch: 10, experiment: 3, different_dim: 4, different_dim2: 4)>\n", "0.7075 1.025 0.5685 0.8951 0.2065 3.384 ... 1.239 0.4527 0.5749 0.4766 0.859\n", - "Dimensions without coordinates: batch, experiment, different_dim, different_dim2
<xarray.DataArray (batch: 10, experiment: 3, dim: 4, different_dim2: 4)>\n", "1.845 5.326 2.407 3.89 3.378 14.68 5.449 ... 5.586 6.55 1.279 1.373 1.791 2.658\n", - "Dimensions without coordinates: batch, experiment, dim, different_dim2
<xarray.DataArray (dim: 4, dim2: 4, experiment: 3, experiment2: 3)>\n", "9.727 6.68 3.595 6.68 18.66 6.065 3.595 ... 10.81 36.08 8.181 3.233 8.181 14.77\n", - "Dimensions without coordinates: dim, dim2, experiment, experiment2
<xarray.DataArray (batch: 10, dim: 4, dim2: 4)>\n", "4.487 3.158 0.9252 2.683 0.5319 3.799 ... 3.387 1.796 2.601 2.455 1.538 5.402\n", - "Dimensions without coordinates: batch, dim, dim2
<xarray.DataArray (dim: 4, dim2: 4)>\n", "22.27 32.55 29.06 40.96 23.96 33.48 ... 25.27 29.59 34.97 20.57 34.89 30.26\n", - "Dimensions without coordinates: dim, dim2
<xarray.DataArray (batch: 10, dim: 4, dim2: 4)>\n", "10.79 3.543 0.4447 2.399 0.111 11.58 10.95 ... 5.104 1.799 2.513 3.052 0.79 13.1\n", - "Dimensions without coordinates: batch, dim, dim2
<xarray.DataArray (dim: 4, dim2: 4, batch: 10, experiment: 3)>\n", "33.15 44.26 22.52 1.318 1.76 0.8951 ... 19.52 36.93 18.42 42.62 80.64 40.23\n", - "Dimensions without coordinates: dim, dim2, batch, experiment
<xarray.DataArray (dim: 4, dim2: 4)>\n", "496.0 1.06e+03 844.2 1.678e+03 573.9 ... 875.4 1.223e+03 423.1 1.218e+03 915.8\n", - "Dimensions without coordinates: dim, dim2
<xarray.DataArray (dim: 4, dim2: 4)>\n", "32.03 68.57 42.6 101.0 40.06 76.88 59.44 ... 33.78 83.88 72.41 32.43 76.33 60.63\n", - "Dimensions without coordinates: dim, dim2
<xarray.DataArray (dim: 4, dim2: 4)>\n", "32.03 68.57 42.6 101.0 40.06 76.88 59.44 ... 33.78 83.88 72.41 32.43 76.33 60.63\n", - "Dimensions without coordinates: dim, dim2
<xarray.DataArray (batch: 10, experiment: 3, dim: 4)>\n", "2.676 19.38 0.8116 5.562 11.33 2.104 ... 6.259 12.24 6.737 0.5945 7.355 1.5\n", - "Dimensions without coordinates: batch, experiment, dim
<xarray.DataArray (batch: 10, experiment: 3, dim: 4, dim_auto2: 4)>\n", "2.676 6.135 1.302 3.007 6.135 19.38 2.018 ... 7.355 2.884 2.942 0.8866 2.884 1.5\n", - "Dimensions without coordinates: batch, experiment, dim, dim_auto2
<xarray.DataArray (experiment: 3, dim: 4, dim2: 4, batch: 10, batch2: 10)>\n", "0.5006 0.09001 0.1315 0.3874 0.5949 0.6645 ... 2.931 0.2908 0.5802 0.4342 0.7379\n", - "Dimensions without coordinates: experiment, dim, dim2, batch, batch2
<xarray.DataArray (rv_dim0: 10, chain: 4, draw: 10, team: 6)>\n", - "-0.5462 1.221 0.7538 -0.1699 0.008793 ... 0.2442 -0.1568 0.03705 1.022 2.371\n", + "-0.06616 0.3246 1.037 -0.1329 -0.06425 ... 0.005495 0.3913 0.3253 0.2695 2.053\n", "Coordinates:\n", " * team (team) <U1 'a' 'b' 'c' 'd' 'e' 'f'\n", " * chain (chain) int64 0 1 2 3\n", " * draw (draw) int64 0 1 2 3 4 5 6 7 8 9\n", - "Dimensions without coordinates: rv_dim0
array(['a', 'b', 'c', 'd', 'e', 'f'], dtype='<U1')
array([0, 1, 2, 3])
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
PandasIndex(Index(['a', 'b', 'c', 'd', 'e', 'f'], dtype='object', name='team'))
PandasIndex(Int64Index([0, 1, 2, 3], dtype='int64', name='chain'))
PandasIndex(Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype='int64', name='draw'))
<xarray.DataArray (subject: 5, batch: 3, chain: 4, draw: 10, team: 6)>\n", - "-0.3871 0.1645 0.8031 -0.4782 -0.5517 ... 0.477 -0.5015 -0.1281 0.04756 1.946\n", + "0.02322 0.252 1.428 0.06006 0.01792 ... 0.3755 -0.1818 0.1006 0.06794 1.643\n", "Coordinates:\n", " * team (team) <U1 'a' 'b' 'c' 'd' 'e' 'f'\n", " * chain (chain) int64 0 1 2 3\n", " * draw (draw) int64 0 1 2 3 4 5 6 7 8 9\n", - "Dimensions without coordinates: subject, batch
array(['a', 'b', 'c', 'd', 'e', 'f'], dtype='<U1')
array([0, 1, 2, 3])
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
PandasIndex(Index(['a', 'b', 'c', 'd', 'e', 'f'], dtype='object', name='team'))
PandasIndex(Int64Index([0, 1, 2, 3], dtype='int64', name='chain'))
PandasIndex(Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype='int64', name='draw'))
array([0, 1, 2, 3])
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
array(['a', 'b', 'c', 'd', 'e', 'f'], dtype='<U1')
PandasIndex(Int64Index([0, 1, 2, 3], dtype='int64', name='chain'))
PandasIndex(Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype='int64', name='draw'))
PandasIndex(Index(['a', 'b', 'c', 'd', 'e', 'f'], dtype='object', name='team'))
array([0.25, 0.5 , 0.75])
array([0, 1, 2, 3])
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
array(['a', 'b', 'c', 'd', 'e', 'f'], dtype='<U1')
PandasIndex(Float64Index([0.25, 0.5, 0.75], dtype='float64', name='quantile'))
PandasIndex(Int64Index([0, 1, 2, 3], dtype='int64', name='chain'))
PandasIndex(Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype='int64', name='draw'))
PandasIndex(Index(['a', 'b', 'c', 'd', 'e', 'f'], dtype='object', name='team'))
PandasIndex(Float64Index([ -5.0, -4.795918367346939, -4.591836734693878,\n", + " -4.387755102040816, -4.183673469387755, -3.979591836734694,\n", + " -3.7755102040816326, -3.571428571428571, -3.36734693877551,\n", + " -3.163265306122449, -2.9591836734693877, -2.7551020408163263,\n", + " -2.5510204081632653, -2.3469387755102042, -2.142857142857143,\n", + " -1.9387755102040813, -1.7346938775510203, -1.5306122448979593,\n", + " -1.3265306122448979, -1.1224489795918364, -0.9183673469387754,\n", + " -0.7142857142857144, -0.5102040816326525, -0.3061224489795915,\n", + " -0.1020408163265305, 0.1020408163265305, 0.3061224489795915,\n", + " 0.5102040816326534, 0.7142857142857144, 0.9183673469387754,\n", + " 1.1224489795918373, 1.3265306122448983, 1.5306122448979593,\n", + " 1.7346938775510203, 1.9387755102040813, 2.1428571428571432,\n", + " 2.3469387755102042, 2.5510204081632653, 2.755102040816327,\n", + " 2.959183673469388, 3.163265306122449, 3.36734693877551,\n", + " 3.571428571428571, 3.775510204081632, 3.979591836734695,\n", + " 4.183673469387756, 4.387755102040817, 4.591836734693878,\n", + " 4.795918367346939, 5.0],\n", + " dtype='float64', name='point'))
PandasIndex(Int64Index([0, 1, 2, 3], dtype='int64', name='chain'))
PandasIndex(Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype='int64', name='draw'))
PandasIndex(Index(['a', 'b', 'c', 'd', 'e', 'f'], dtype='object', name='team'))