def SCATTER_INDICES_FILTER()

in Synthesis_incorporation/value_search/operation_filtering.py [0:0]


def SCATTER_INDICES_FILTER(arg_value):
    """Must be an int tensor appropriate for indices in scatter operations."""
    return (
        arg_value.is_tensor
        and arg_value.has_int_dtype
        and len(arg_value.shape) >= 2
        and arg_value.shape[-1] <= limits.MAX_NUM_DIMENSIONS
        and arg_value.min() >= 0
        and arg_value.max() < limits.MAX_DIMENSION_LENGTH
    )