parse_stack_mesh

parse_stack_mesh#

parse_stack_mesh(r, t, p)[source]#

Validate that three coordinate arrays share an identical shape.

Used by StackMeshMixin methods to confirm that r, t, p describe a single set of \(N\)-D points (rather than independent 1-D axes).

Parameters:
rnp.ndarray

Radial coordinate array.

tnp.ndarray

Colatitude coordinate array.

pnp.ndarray

Longitude coordinate array.

Returns:
outtuple[np.ndarray, np.ndarray, np.ndarray]

The input arrays unchanged as a 3-tuple (r, t, p).

Raises:
ValueError

If r, t, and p do not all have the same shape.