tracel-ai/burn · error

int_select_assign with {other:?} update is not implemented

Error message

int_select_assign with {other:?} update is not implemented

What it means

Unimplemented-operation guard in the ndarray backend's `int_select_assign`: the requested `IndexingUpdateOp` (`other`) for selecting-and-updating integer tensors has no implementation; only the implemented variants (such as Assign/Set) work.

Source

Thrown at crates/burn-ndarray/src/ops/int_tensor.rs:358

                        NdArrayMathOps::<I>::select_assign(tensor, dim, idx_array, value)
                    })
                })
            }
            burn_backend::tensor::IndexingUpdateOp::Assign => {
                execute_with_int_dtype!((tensor, value), I, |tensor, value| -> NdArrayTensor {
                    execute_with_int_dtype!(indices, |idx_array| {
                        NdArrayMathOps::<I>::select_assign_replace(tensor, dim, idx_array, value)
                    })
                })
            }
            burn_backend::tensor::IndexingUpdateOp::Mul => {
                execute_with_int_dtype!((tensor, value), I, |tensor, value| -> NdArrayTensor {
                    execute_with_int_dtype!(indices, |idx_array| {
                        NdArrayMathOps::<I>::select_assign_mul(tensor, dim, idx_array, value)
                    })
                })
            }
            other => unimplemented!("int_select_assign with {other:?} update is not implemented"),
        }
    }
    fn int_argmax(tensor: NdArrayTensor, dim: usize) -> NdArrayTensor {
        // Use view() for zero-copy on borrowed storage
        execute_with_int_dtype!(tensor, E, |array: SharedArray<E>| {
            NdArrayMathOps::argmax_view::<E>(array.view(), dim)
        })
    }

    fn int_argmin(tensor: NdArrayTensor, dim: usize) -> NdArrayTensor {
        // Use view() for zero-copy on borrowed storage
        execute_with_int_dtype!(tensor, E, |array: SharedArray<E>| {
            NdArrayMathOps::argmin_view::<E>(array.view(), dim)
        })
    }

    fn int_clamp_min(tensor: NdArrayTensor, min: Scalar) -> NdArrayTensor {
        execute_with_int_dtype!(tensor, |array| NdArrayMathOps::clamp_min(array, min.elem()))

View on GitHub (pinned to d16f7ba2ed)

Solutions

  1. Use a supported update op (e.g., Assign) for integer select_assign
  2. Implement the operation manually with slicing on the integer tensor
  3. Add the missing match arm in burn-ndarray's int_tensor ops
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/burn-ndarray/src/ops/int_tensor.rs:358 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tracel-ai/burn@d16f7ba2ed (2026-09-05). Data as JSON: /api/errors/cfc2782f95980468. Report an issue: GitHub.