symmray.common¶
Common interfaces for all symmray array objects.
Attributes¶
Classes¶
Common functionality for all symmray array like objects. |
Module Contents¶
- symmray.common._symmray_namespace = None¶
- class symmray.common.SymmrayCommon[source]¶
Common functionality for all symmray array like objects.
- _modify_or_copy(inplace=False, **kwargs) SymmrayCommon[source]¶
- to(like=None, *, backend=None, dtype=None, device=None, inplace=False)[source]¶
Convert all underlying arrays to a backend, dtype, and/or device.
- Parameters:
like (str or array_like, optional) – Conversion target specification or example array. For example “torch-float32-cuda:0” or an example array with those attributes. Explicitly supplied backend, dtype or device override this.
backend (str, optional) – Target backend.
dtype (str or dtype, optional) – Target floating point or complex dtype.
device (str or device_like, optional) – Target device.
inplace (bool, optional) – Whether to convert this object in place.
- Returns:
The converted object.
- Return type:
- __neg__() SymmrayCommon[source]¶
- _do_unary_op(fn, inplace=False) SymmrayCommon[source]¶
Perform a unary operation on blocks of the array.
- property real¶
Return the real part of the array.
- property imag¶
Return the imaginary part of the array.