phileas.iteration.utility#

This module defines utility functions related to iteration.

Functions

data_tree_to_xarray_index(tree, dims_name)

Convert a data tree generated by iterating over an iteration tree to an index suitable for indexing an xarray container initialized using iteration_tree_to_xarray_parameters().

flatten_datatree(tree[, key_prefix, separator])

Transform nested dict and list objects to a single-level dict.

is_transformed_iteration_leaf(tree)

A transformed iteration leaf is an iteration tree that only contained Transform and IterationLeaf nodes.

iteration_tree_to_multiindex(tree)

Create a pandas.MultiIndex that holds the values stored in an iteration tree.

iteration_tree_to_xarray_parameters(tree)

Generate the arguments required to build an xarray.DataArray or xarray.DataFrame.

recursive_union(tree1, tree2)

Return the recursive union of two datatrees.

restrict_leaves_sizes(tree[, policy])

Restrict the size of the iteration leaves of the tree, depending on the restriction policy.

Classes

RestrictionPolicy(value[, names, module, ...])