legate.core.Scalar#

class legate.core.Scalar(value: Any, dtype: object = None)#
__init__()#

Construct a Scalar.

Parameters:
  • value (Any) – The value to fill the scalar with.

  • dtype (Type | None) – The Type of the value. If it is None, the type will be deduced.

Raises:

NotImplementedError – If the type could not be deduced from the object.

Attributes

__array_interface__

dict[str, Any]

ptr

uintptr_t

raw_handle

uintptr_t

type

Type

Methods

__repr__(self)

Return a human-readable representation of the scalar.

__str__(self)

Return a human-readable representation of the scalar.

null()

Construct a nullary Scalar.

value(self)

Get the value of the object contained by the Scalar.