I want to keep everything around the nc object and the formula_terms dictionary.
We can easily get all the dimensions, including the final z dimension with,
def formula_dims(formula_terms):
dims = {k: tuple(sorted(nc[v].dimensions)) for k, v in formula_terms.items()}
z_dims = tuple(sorted(set([item for sublist in dims.values() for item in sublist])))
dims.update(z=z_dims)
return dims
I just need to use that later in nc2biggus or any other array backend. Well... Calling these hackish functions a backend might be too much :stuck_out_tongue_winking_eye:
I want to keep everything around the
nc
object and theformula_terms
dictionary.We can easily get all the dimensions, including the final z dimension with,
I just need to use that later in
nc2biggus
or any other array backend. Well... Calling these hackish functions a backend might be too much :stuck_out_tongue_winking_eye: