cunumeric.asarray#

cunumeric.asarray(a: Any, dtype: dtype[Any] | None = None) ndarray#

Convert the input to an array.

Parameters:
  • a (array_like) – Input data, in any form that can be converted to an array. This includes lists, lists of tuples, tuples, tuples of tuples, tuples of lists and ndarrays.

  • dtype (data-type, optional) – By default, the data-type is inferred from the input data.

Returns:

out – Array interpretation of a. No copy is performed if the input is already an ndarray with matching dtype. If a is a subclass of ndarray, a base class ndarray is returned.

Return type:

ndarray

See also

numpy.asarray

Availability:

Multiple GPUs, Multiple CPUs