Skip to content

tuple_removeTupleRemoveTupleRemovetuple_removetuple_remove🔗

Short description🔗

tuple_removeTupleRemoveTupleRemovetuple_removetuple_remove — Remove elements from a tuple.

Signature🔗

tuple_remove( tuple Tuple, integer Index, out tuple Reduced )void TupleRemove( const HTuple& Tuple, const HTuple& Index, HTuple* Reduced )static void HOperatorSet.TupleRemove( HTuple tuple, HTuple index, out HTuple reduced )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]Herror tuple_remove( const Hlong Tuple, const Hlong Index, Hlong* Reduced )

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

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

HTuple HTuple.TupleRemove( HTuple index )

Description🔗

tuple_removeTupleRemove removes one or more elements from the tuple Tupletupletuple and returns the rest in the tuple Reducedreducedreduced. Indexindexindex determines the indices of the elements to remove. Thus, Indexindexindex may only contain integer values (any floating point number within Indexindexindex 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 Tupletupletuple is empty, the operator returns an empty tuple.

HDevelop In-line Operation🔗

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

Reduced := remove(Tuple, Index)

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

Tupletupletuple (input_control) tuple(-array) → (integer / real / string)HTuple (Hlong / double / HString)HTuple (int / long / double / string)MaybeSequence[Union[float, int, str]]Htuple (Hlong / double / char*)

Input tuple.

Indexindexindex (input_control) integer(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

Indices of the elements to remove.

Reducedreducedreduced (output_control) tuple(-array) → (integer / real / string)HTuple (Hlong / double / HString)HTuple (int / long / double / string)Sequence[Union[float, int, str]]Htuple (Hlong / double / char*)

Reduced tuple.

Combinations with other operators🔗

Combinations

Alternatives

tuple_first_nTupleFirstN, tuple_last_nTupleLastN, tuple_str_bit_selectTupleStrBitSelect, tuple_concatTupleConcat, tuple_insertTupleInsert, tuple_replaceTupleReplace

See also

tuple_selectTupleSelect, tuple_select_maskTupleSelectMask

Module🔗

Foundation