pair#

swordfish.pair(a, b, *, type=None)#

Creates a Swordfish Pair from two Scalar values.

Parameters:
  • a (Any) – The first value in the Pair.

  • b (Any) – The second value in the Pair.

  • type (DataType, optional) – The data type of the Pair. Defaults to None.

Returns:

A Swordfish Pair object.

Return type:

Pair

Examples

>>> import swordfish as sf
>>> sf.pair(1, 0, type="LONG")
Pair(1 : 0, type=LONG)