yobx.reference.ops.op__overwrite_gather#

class yobx.reference.ops.op__overwrite_gather.Gather(onnx_node: NodeProto, run_params: dict[str, Any], schema: Any = None)[source]#

Overrides the ONNX reference Gather op to ensure contiguous arrays.

ONNX 1.20.x has a bug where indices.ascontiguousarray() is called instead of np.ascontiguousarray(indices). Non-contiguous index arrays (e.g. produced by Split + Squeeze) trigger an AttributeError in the upstream implementation. This override guards against that by making both inputs contiguous before calling np.take.