coordax.Field.untag¶
- Field.untag(*axis_order: str | Coordinate) Field[source]¶
Returns a view of the field with the requested axes made positional.
- Parameters:
*axis_order – Names or coordinates of the axes to untag.
- Returns:
A new Field with the specified axes converted to positional dimensions.
Examples
>>> import coordax as cx >>> import jax.numpy as jnp >>> x = cx.SizedAxis('x', 2) >>> field = cx.field(jnp.ones((2, 3)), x, 'y')
Untag by name:
>>> field.untag('x') <Field dims=(None, 'y') shape=(2, 3) axes={} > >>> field.untag('y') <Field dims=('x', None) shape=(2, 3) axes={'x': SizedAxis} >
Untag by coordinate (validates that the coordinate matches):
>>> field.untag(x) <Field dims=(None, 'y') shape=(2, 3) axes={} >
See also