IsingPolyArray

class IsingPolyArray

Bases: PolyArray

Methods

__init__

__init__

copy

copy

decode

decode

diagonal

diagonal

evaluate

evaluate

fill

fill

flatten

flatten

nonzero

nonzero

ravel

ravel

repeat

repeat

reshape

reshape

roll

roll

substitute

substitute

sum

sum

swapaxes

swapaxes

take

take

to_list

to_list

to_numpy

to_numpy

tolist

alias of to_list()

tonumpy

alias of to_numpy()

transpose

transpose

view

view

Attributes

T

T property

flat

flat property

ndim

ndim property

shape

shape property

size

size property

class Iterator
__init__(*args, **kwargs)
__iter__(self) Iterator

__iter__

Return type:

Iterator

__next__(self) PolyArray | Poly

__next__

Return type:

PolyArray | Poly

__add__(self, arg: PolyArray | Poly | float | int | list | ndarray, /) PolyArray

__add__

Parameters:

arg (PolyArray | Poly | float | int | list | ndarray) –

Return type:

PolyArray

__and__(
self,
arg: PolyArray | Poly | bool | list | ndarray[Any, dtype[numpy.bool_]],
/,
) PolyArray

__and__

Parameters:

arg (PolyArray | Poly | bool | list | ndarray) –

Return type:

PolyArray

__bool__(self) bool

__bool__

Return type:

bool

__copy__(self) PolyArray

__copy__

Return type:

PolyArray

__deepcopy__(self, arg: dict, /) PolyArray

__deepcopy__

Parameters:

arg (dict) –

Return type:

PolyArray

__eq__(
self,
arg: PolyArray | Poly | float | int | list | ndarray,
/,
) ndarray[Any, dtype[numpy.bool_]]

__eq__

Parameters:

arg (PolyArray | Poly | float | int | list | ndarray) –

Return type:

ndarray

__float__(self) float

__float__

Return type:

float

__getitem__(self, arg: tuple | slice | EllipsisType | int | None) PolyArray | Poly

__getitem__

Parameters:

arg (tuple | slice | EllipsisType | int | None) –

Return type:

PolyArray | Poly

__iadd__(self, arg: PolyArray | Poly | float | int | list | ndarray, /) PolyArray

__iadd__

Parameters:

arg (PolyArray | Poly | float | int | list | ndarray) –

Return type:

PolyArray

__iand__(
self,
arg: PolyArray | Poly | bool | list | ndarray[Any, dtype[numpy.bool_]],
/,
) PolyArray

__iand__

Parameters:

arg (PolyArray | Poly | bool | list | ndarray) –

Return type:

PolyArray

__imul__(self, arg: PolyArray | Poly | float | int | list | ndarray, /) PolyArray

__imul__

Parameters:

arg (PolyArray | Poly | float | int | list | ndarray) –

Return type:

PolyArray

__index__(self) int

__index__

Return type:

int

__init__(self, object: ndarray | list | Poly) None

__init__

Parameters:

object (ndarray | list | Poly) –

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__int__(self) int

__int__

Return type:

int

__invert__(self) PolyArray

__invert__

Return type:

PolyArray

__ior__(
self,
arg: PolyArray | Poly | bool | list | ndarray[Any, dtype[numpy.bool_]],
/,
) PolyArray

__ior__

Parameters:

arg (PolyArray | Poly | bool | list | ndarray) –

Return type:

PolyArray

__ipow__(self, arg: int, /) PolyArray

__ipow__

Parameters:

arg (int) –

Return type:

PolyArray

__isub__(self, arg: PolyArray | Poly | float | int | list | ndarray, /) PolyArray

__isub__

Parameters:

arg (PolyArray | Poly | float | int | list | ndarray) –

Return type:

PolyArray

__iter__(self) Iterator

__iter__

Return type:

Iterator

__itruediv__(self, arg: float | int | list | ndarray, /) PolyArray

__itruediv__

Parameters:

arg (float | int | list | ndarray) –

Return type:

PolyArray

__ixor__(
self,
arg: PolyArray | Poly | bool | list | ndarray[Any, dtype[numpy.bool_]],
/,
) PolyArray

__ixor__

Parameters:

arg (PolyArray | Poly | bool | list | ndarray) –

Return type:

PolyArray

__len__(self) int

__len__

Return type:

int

__matmul__(self, arg: PolyArray | ndarray, /) Poly | PolyArray

__matmul__

Parameters:

arg (PolyArray | ndarray) –

Return type:

Poly | PolyArray

__mul__(self, arg: PolyArray | Poly | float | int | list | ndarray, /) PolyArray

__mul__

Parameters:

arg (PolyArray | Poly | float | int | list | ndarray) –

Return type:

PolyArray

__ne__(
self,
arg: PolyArray | Poly | float | int | list | ndarray,
/,
) ndarray[Any, dtype[numpy.bool_]]

__ne__

Parameters:

arg (PolyArray | Poly | float | int | list | ndarray) –

Return type:

ndarray

__neg__(self) PolyArray

__neg__

Return type:

PolyArray

__or__(
self,
arg: PolyArray | Poly | bool | list | ndarray[Any, dtype[numpy.bool_]],
/,
) PolyArray

__or__

Parameters:

arg (PolyArray | Poly | bool | list | ndarray) –

Return type:

PolyArray

__pos__(self) PolyArray

__pos__

Return type:

PolyArray

__pow__(self, arg: int, /) PolyArray

__pow__

Parameters:

arg (int) –

Return type:

PolyArray

__radd__(self, arg: Poly | float | int | list | ndarray, /) PolyArray

__radd__

Parameters:

arg (Poly | float | int | list | ndarray) –

Return type:

PolyArray

__rand__(self, arg: Poly | bool | list | ndarray[Any, dtype[numpy.bool_]], /) PolyArray

__rand__

Parameters:

arg (Poly | bool | list | ndarray) –

Return type:

PolyArray

__repr__(self) str

__repr__

Return type:

str

__rmatmul__(self, arg: PolyArray | ndarray, /) Poly | PolyArray

__rmatmul__

Parameters:

arg (PolyArray | ndarray) –

Return type:

Poly | PolyArray

__rmul__(self, arg: Poly | float | int | list | ndarray, /) PolyArray

__rmul__

Parameters:

arg (Poly | float | int | list | ndarray) –

Return type:

PolyArray

__ror__(self, arg: Poly | bool | list | ndarray[Any, dtype[numpy.bool_]], /) PolyArray

__ror__

Parameters:

arg (Poly | bool | list | ndarray) –

Return type:

PolyArray

__rsub__(self, arg: Poly | float | int | list | ndarray, /) PolyArray

__rsub__

Parameters:

arg (Poly | float | int | list | ndarray) –

Return type:

PolyArray

__rxor__(self, arg: Poly | bool | list | ndarray[Any, dtype[numpy.bool_]], /) PolyArray

__rxor__

Parameters:

arg (Poly | bool | list | ndarray) –

Return type:

PolyArray

__setitem__(
self,
arg: tuple | slice | EllipsisType | int | None,
value: Poly | float | int | list | ndarray | PolyArray,
) None

__setitem__

Parameters:
__str__(self) str

__str__

Return type:

str

__sub__(self, arg: PolyArray | Poly | float | int | list | ndarray, /) PolyArray

__sub__

Parameters:

arg (PolyArray | Poly | float | int | list | ndarray) –

Return type:

PolyArray

__truediv__(self, arg: float | int | list | ndarray, /) PolyArray

__truediv__

Parameters:

arg (float | int | list | ndarray) –

Return type:

PolyArray

__xor__(
self,
arg: PolyArray | Poly | bool | list | ndarray[Any, dtype[numpy.bool_]],
/,
) PolyArray

__xor__

Parameters:

arg (PolyArray | Poly | bool | list | ndarray) –

Return type:

PolyArray

copy(self) PolyArray

copy

Return type:

PolyArray

decode(self, values: Values) ndarray[Any, dtype[numpy.float64]]
decode(self, values: Values, default: float) ndarray[Any, dtype[numpy.float64]]
decode(self, values: Values, default: None | None) PolyArray

decode

Overloading:

1. decode(self, values: amplify.Values) -> numpy.ndarray[Any, numpy.dtype[numpy.float64]]

Args:
  • values (amplify.Values):

Returns:

numpy.ndarray:

2. decode(self, values: amplify.Values, default: float) -> numpy.ndarray[Any, numpy.dtype[numpy.float64]]

Args:
  • values (amplify.Values):

  • default (float):

Returns:

numpy.ndarray:

3. decode(self, values: amplify.Values, default: Optional[None]) -> amplify.PolyArray

Args:
  • values (amplify.Values):

  • default (None | None):

Returns:

amplify.PolyArray:

diagonal(self, offset: int = 0, axis1: int = 0, axis2: int = 1) PolyArray

diagonal

Parameters:
  • offset (int) – Defaults to 0.

  • axis1 (int) – Defaults to 0.

  • axis2 (int) – Defaults to 1.

Return type:

PolyArray

evaluate(self, values: Values) ndarray[Any, dtype[numpy.float64]]
evaluate(self, values: Values, default: float) ndarray[Any, dtype[numpy.float64]]
evaluate(self, values: Values, default: None | None) PolyArray

evaluate

Overloading:

1. evaluate(self, values: amplify.Values) -> numpy.ndarray[Any, numpy.dtype[numpy.float64]]

Args:
  • values (amplify.Values):

Returns:

numpy.ndarray:

2. evaluate(self, values: amplify.Values, default: float) -> numpy.ndarray[Any, numpy.dtype[numpy.float64]]

Args:
  • values (amplify.Values):

  • default (float):

Returns:

numpy.ndarray:

3. evaluate(self, values: amplify.Values, default: Optional[None]) -> amplify.PolyArray

Args:
  • values (amplify.Values):

  • default (None | None):

Returns:

amplify.PolyArray:

fill(self, value: Poly | float | int) None

fill

Parameters:

value (Poly | float | int) –

flatten(self) PolyArray

flatten

Return type:

PolyArray

nonzero(self) tuple[ndarray[Any, dtype[numpy.uint64]], ...]

nonzero

Return type:

tuple[ndarray[Any, dtype[numpy.uint64]], …]

ravel(self) PolyArray

ravel

Return type:

PolyArray

repeat(self, repeats: int | list[int], axis: int | None = None) PolyArray

repeat

Parameters:
  • repeats (int | list[int]) –

  • axis (int | None) – Defaults to None.

Return type:

PolyArray

reshape(self, shape: int | tuple[int, ...]) PolyArray
reshape(self, *shape: int) PolyArray

reshape

Overloading:

1. reshape(self, shape: Union[int, tuple[int, …]]) -> amplify.PolyArray

Args:
  • shape (int | tuple[int, …]):

Returns:

amplify.PolyArray:

2. reshape(self, *shape: int) -> amplify.PolyArray

Args:
  • *shape (int):

Returns:

amplify.PolyArray:

roll(self, shift: int, axis: int | None = None) PolyArray

roll

Parameters:
  • shift (int) –

  • axis (int | None) – Defaults to None.

Return type:

PolyArray

substitute(self, mapping: dict[Poly, Poly | float | int]) PolyArray

substitute

Parameters:

mapping (dict[Poly, Union[Poly, float, int]]) –

Return type:

PolyArray

sum(self, axis: Literal[None] | None = None) Poly
sum(self, axis: int | tuple[int, ...] | None) Poly | PolyArray

sum

Overloading:

1. sum(self, axis: Optional[Literal[None]] = None) -> amplify.Poly

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

Returns:

amplify.Poly:

2. sum(self, axis: Optional[Union[int, tuple[int, …]]]) -> Union[amplify.Poly, amplify.PolyArray]

Args:
  • axis (int | tuple[int, …] | None):

Returns:

amplify.Poly | amplify.PolyArray:

swapaxes(self, axis1: int, axis2: int) PolyArray

swapaxes

Parameters:
  • axis1 (int) –

  • axis2 (int) –

Return type:

PolyArray

take(self, indices: int | list[int], axis: int | None = None) PolyArray | Poly

take

Parameters:
  • indices (int | list[int]) –

  • axis (int | None) – Defaults to None.

Return type:

PolyArray | Poly

to_list(self) Poly | list[Poly]

to_list

Return type:

Poly | list[Poly]

to_numpy(self) ndarray[Any, dtype[numpy.float64]]

to_numpy

Return type:

ndarray

tolist(self) Poly | list[Poly]

alias of to_list()

Return type:

Poly | list[Poly]

tonumpy(self) ndarray[Any, dtype[numpy.float64]]

alias of to_numpy()

Return type:

ndarray

transpose(self, axes: tuple[int, ...] | None = None) PolyArray
transpose(self, *axes: int) PolyArray

transpose

Overloading:

1. transpose(self, axes: Optional[tuple[int, …]] = None) -> amplify.PolyArray

Args:
  • axes (tuple[int, …] | None): Defaults to None.

Returns:

amplify.PolyArray:

2. transpose(self, *axes: int) -> amplify.PolyArray

Args:
  • *axes (int):

Returns:

amplify.PolyArray:

view(self) PolyArray

view

Return type:

PolyArray

property T

T property

Return type:

PolyArray

__deprecated__ = 'IsingPolyArray is deprecated since amplify v1.0.0 and will no longer support in the near future.\nUse PolyArray instead. Please see the migration guide for details: https://amplify.fixstars.com/docs/amplify/v1/migration.html'
__dict__ = mappingproxy({'__module__': 'amplify._backward', '__dict__': <attribute '__dict__' of 'IsingPolyArray' objects>, '__weakref__': <attribute '__weakref__' of 'IsingPolyArray' objects>, '__doc__': None, '__new__': <staticmethod(<function PolyArray.__new__>)>, '__init_subclass__': <function IsingPolyArray.__init_subclass__>, '__deprecated__': 'IsingPolyArray is deprecated since amplify v1.0.0 and will no longer support in the near future.\nUse PolyArray instead. Please see the migration guide for details: https://amplify.fixstars.com/docs/amplify/v1/migration.html', '__annotations__': {}})
__weakref__

list of weak references to the object (if defined)

property flat

flat property

Return type:

PolyArray

property ndim

ndim property

Return type:

int

property shape

shape property

Return type:

tuple[int, …]

property size

size property

Return type:

int