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
Gatherop to ensure contiguous arrays.ONNX 1.20.x has a bug where
indices.ascontiguousarray()is called instead ofnp.ascontiguousarray(indices). Non-contiguous index arrays (e.g. produced bySplit+Squeeze) trigger anAttributeErrorin the upstream implementation. This override guards against that by making both inputs contiguous before callingnp.take.