tuple_removetuple_removeTupleRemoveTupleRemovetuple_remove (Operator)

Name

tuple_removetuple_removeTupleRemoveTupleRemovetuple_remove — Remove elements from a tuple.

Signature

tuple_remove( : : Tuple, Index : Reduced)

Herror tuple_remove(const Hlong Tuple, const Hlong Index, Hlong* Reduced)

Herror T_tuple_remove(const Htuple Tuple, const Htuple Index, Htuple* Reduced)

void TupleRemove(const HTuple& Tuple, const HTuple& Index, HTuple* Reduced)

HTuple HTuple::TupleRemove(const HTuple& Index) const

static void HOperatorSet.TupleRemove(HTuple tuple, HTuple index, out HTuple reduced)

HTuple HTuple.TupleRemove(HTuple index)

def tuple_remove(tuple: MaybeSequence[Union[float, int, str]], index: MaybeSequence[int]) -> Sequence[Union[float, int, str]]

def tuple_remove_s(tuple: MaybeSequence[Union[float, int, str]], index: MaybeSequence[int]) -> Union[float, int, str]

Description

tuple_removetuple_removeTupleRemoveTupleRemovetuple_remove removes one or more elements from the tuple TupleTupleTupletupletuple and returns the rest in the tuple ReducedReducedReducedreducedreduced. IndexIndexIndexindexindex determines the indices of the elements to remove. Thus, IndexIndexIndexindexindex may only contain integer values (any floating point number within IndexIndexIndexindexindex must represent an integer value without fraction). Note that indices of tuple elements start at 0, i.e. the first tuple element has got the index 0. Duplicates and indices out of range are ignored.

Exception: Empty input tuple

If TupleTupleTupletupletuple is empty, the operator returns an empty tuple.

HDevelop In-line Operation

HDevelop provides an in-line operation for tuple_removetuple_removeTupleRemoveTupleRemovetuple_remove, which can be used in an expression in the following syntax:

Reduced := remove(Tuple, Index)

Execution Information

Parameters

TupleTupleTupletupletuple (input_control)  tuple(-array) HTupleMaybeSequence[Union[float, int, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)

Input tuple.

IndexIndexIndexindexindex (input_control)  integer(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Indices of the elements to remove.

ReducedReducedReducedreducedreduced (output_control)  tuple(-array) HTupleSequence[Union[float, int, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)

Reduced tuple.

Alternatives

tuple_first_ntuple_first_nTupleFirstNTupleFirstNtuple_first_n, tuple_last_ntuple_last_nTupleLastNTupleLastNtuple_last_n, tuple_str_bit_selecttuple_str_bit_selectTupleStrBitSelectTupleStrBitSelecttuple_str_bit_select, tuple_concattuple_concatTupleConcatTupleConcattuple_concat, tuple_inserttuple_insertTupleInsertTupleInserttuple_insert, tuple_replacetuple_replaceTupleReplaceTupleReplacetuple_replace

See also

tuple_selecttuple_selectTupleSelectTupleSelecttuple_select, tuple_select_masktuple_select_maskTupleSelectMaskTupleSelectMasktuple_select_mask

Module

Foundation