decent_bench.utils.array#

class decent_bench.utils.array.Array(value: SupportedArrayTypes)[source]#

Bases: object

A wrapper class for SupportedArrayTypes objects to enable operator overloading.

This class allows for seamless interoperability between different array/tensor frameworks by overloading standard arithmetic operators. Operations supported are addition, subtraction, multiplication, division, matrix multiplication, exponentiation, negation and in-place operations.

Note

Instantiation of this class is typically done through the functions in interoperability rather than direct instantiation. This is to ensure proper handling of different underlying array types.