xyzpy.gen.prepare#

Functions

check_for_duplicates(arg, values)

dictify(x)

Ensure x is a dict.

parse_attrs(x)

Ensure x is a dict.

parse_case_results(results, var_names)

parse_cases(cases[, fn_args])

parse_combo_results(results, var_names)

parse_combos(combos)

Turn dicts and single tuples into proper form for combo runners.

parse_constants(x)

Ensure x is a dict.

parse_fn_args(fn, fn_args)

parse_resources(x)

Ensure x is a dict.

parse_var_coords(x)

Ensure x is a dict.

parse_var_dims(var_dims, var_names)

Parse function mapping parameters into standard form.

parse_var_names(var_names)

xyzpy.gen.prepare.dictify(x)[source]#

Ensure x is a dict.

xyzpy.gen.prepare.parse_attrs(x)#

Ensure x is a dict.

xyzpy.gen.prepare.parse_case_results(results, var_names)[source]#
xyzpy.gen.prepare.parse_cases(cases, fn_args=None)[source]#
xyzpy.gen.prepare.parse_combo_results(results, var_names)[source]#
xyzpy.gen.prepare.parse_combos(combos)[source]#

Turn dicts and single tuples into proper form for combo runners.

xyzpy.gen.prepare.parse_constants(x)#

Ensure x is a dict.

xyzpy.gen.prepare.parse_resources(x)#

Ensure x is a dict.

xyzpy.gen.prepare.parse_var_coords(x)#

Ensure x is a dict.

xyzpy.gen.prepare.parse_var_dims(var_dims, var_names)[source]#

Parse function mapping parameters into standard form.

Parameters
  • var_dims (dict, tuple, or str) –

    • dict

      Mapping of each output to its dimensions, each either str or tuple of str. The keys themselves can be a tuple of several output names if they all have the same dimensions.

    • tuple

      List of output dimensions directly corresponding to list of var_names. Must be same length as var_names

    • str

      Only allowed for single output with single dimension.

  • var_names (tuple of str, str, or None) –

    • tuple of str

      List of names of var_names.

    • str

      Single named output.

    • None

      Automatic result output using Dataset/DataArray, in this case check that var_dims is None as well.

xyzpy.gen.prepare.parse_var_names(var_names)[source]#