Skip to content

Commit 8b2acf1

Browse files
committed
add comment about dimension order
1 parent 0b3b9fd commit 8b2acf1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

paper/paper.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ For the first example, we construct an array resembling data from MCMC sampling.
8585
from arviz import array_stats
8686

8787
rng = np.random.default_rng()
88-
samples = rng.normal(size=(4, 1000, 2))
88+
samples = rng.normal(size=(4, 1000, 2)) # (chain, draw, variable)
8989
array_stats.ess(samples, chain_axis=0, draw_axis=1)
9090

91-
We now contrast the array interface with the xarray interface, as we see there is no need to specify the chain and draw information, as this information is already encoded in the `DataTree` object.
91+
We now contrast the array interface with the xarray interface. When converting the NumPy array to a DataTree, ArviZ assigns `chain` and `draw` as named dimensions based on the assumed dimension order, so this information is already encoded in the resulting object and does not need to be specified explicitly when calling other functions.
9292

9393
import arviz as az
9494
dt_samples = az.convert_to_datatree(samples)

0 commit comments

Comments
 (0)