one_hot

one_hot(poly: Poly, label: str = '') Constraint
one_hot(array: PolyArray[_Dim], label: str = '', *, axis: Literal[None] = None) Constraint
one_hot(array: PolyArray[Dim], label: str = '', *, axis: int | tuple[int, ...]) Constraint | ConstraintList
one_hot(array: PolyArray[_Dim], label: str = '', *, axis: tuple[()]) ConstraintList
one_hot(array: PolyArray[Dim1], label: str = '', *, axis: int | tuple[int]) Constraint
one_hot(array: PolyArray[Dim2], label: str = '', *, axis: tuple[int, int]) Constraint
one_hot(array: PolyArray[Dim2], label: str = '', *, axis: int | tuple[int]) ConstraintList
one_hot(array: PolyArray[Dim3], label: str = '', *, axis: tuple[int, int, int]) Constraint
one_hot(array: PolyArray[Dim3], label: str = '', *, axis: int | tuple[int] | tuple[int, int]) ConstraintList
one_hot(array: PolyArray[Dim4], label: str = '', *, axis: tuple[int, int, int, int]) Constraint
one_hot(
array: PolyArray[Dim4],
label: str = '',
*,
axis: int | tuple[int] | tuple[int, int] | tuple[int, int, int],
) ConstraintList

one_hot

Overload 1.

Args:
  • poly (amplify.Poly)

  • label (str): Defaults to ''.

Returns:

amplify.Constraint:

Overload 2.

Args:
  • array (amplify.PolyArray[_Dim])

  • label (str): Defaults to ''.

  • axis (typing.Literal[None]): Defaults to None.

Returns:

amplify.Constraint:

Overload 3.

Args:
  • array (amplify.PolyArray[Dim])

  • label (str): Defaults to ''.

  • axis (int | tuple[int, ...])

Returns:

amplify.Constraint | amplify.ConstraintList:

Overload 4.

Args:
  • array (amplify.PolyArray[_Dim])

  • label (str): Defaults to ''.

  • axis (tuple[()])

Returns:

amplify.ConstraintList:

Overload 5.

Args:
  • array (amplify.PolyArray[Dim1])

  • label (str): Defaults to ''.

  • axis (int | tuple[int])

Returns:

amplify.Constraint:

Overload 6.

Args:
  • array (amplify.PolyArray[Dim2])

  • label (str): Defaults to ''.

  • axis (tuple[int, int])

Returns:

amplify.Constraint:

Overload 7.

Args:
  • array (amplify.PolyArray[Dim2])

  • label (str): Defaults to ''.

  • axis (int | tuple[int])

Returns:

amplify.ConstraintList:

Overload 8.

Args:
  • array (amplify.PolyArray[Dim3])

  • label (str): Defaults to ''.

  • axis (tuple[int, int, int])

Returns:

amplify.Constraint:

Overload 9.

Args:
  • array (amplify.PolyArray[Dim3])

  • label (str): Defaults to ''.

  • axis (int | tuple[int] | tuple[int, int])

Returns:

amplify.ConstraintList:

Overload 10.

Args:
  • array (amplify.PolyArray[Dim4])

  • label (str): Defaults to ''.

  • axis (tuple[int, int, int, int])

Returns:

amplify.Constraint:

Overload 11.

Args:
  • array (amplify.PolyArray[Dim4])

  • label (str): Defaults to ''.

  • axis (int | tuple[int] | tuple[int, int] | tuple[int, int, int])

Returns:

amplify.ConstraintList: