legate.core.Runtime.create_array#

Runtime.create_array(
self,
Type dtype,
shape: Shape | Collection[int] | None = None,
bool nullable=False,
bool optimize_scalar=False,
ndim: int | None = None,
) LogicalArray#

Create a LogicalArray.

If shape is None, the returned array is unbound, otherwise the array is bound.

If not None, this call does not block on the value of shape.

Parameters:
  • dtype (Type) – The type of the array elements.

  • shape (Shape | Collection[int] | None (optional)) – The shape of the array.

  • nullable (bool (False)) – Whether the array is nullable.

  • optimize_scalar (bool (False)) – Whether to optimize the array for scalar storage.

  • ndim (int | None (optional)) – Number of dimensions.

Returns:

The newly created array.

Return type:

LogicalArray

Raises:

ValueError – If both ndim and shape are simultaneously not None.