utilities.arrays#

Utility functions for working with array-based coordinate grids.

This module provides helper functions used inPyMetric for manipulating and analyzing multi-dimensional arrays, particularly in the context of numerical coordinate systems and differential operations.

Functions

apply_ufunc_to_labels(ufunc, method, ...)

Infer the output shape and axis labels of a ufunc applied to labeled input shapes.

broadcast_labels(*inputs)

Broadcast shapes and propagate semantic axis labels, with singleton suppression.

normalize_index(index, axis_size)

Coerce a possibly negative index into a valid non-negative index.