arkouda icon indicating copy to clipboard operation
arkouda copied to clipboard

array_api to call functions from arkouda.pdarray_creation

Open ajpotts opened this issue 6 months ago • 0 comments

Modify array_api to call functions from arkouda.pdarray_creation.

This example was recommended by @jeremiah-corrado:

def zeros(
    shape: Union[int, Tuple[int, ...]],
    /,
    *,
    dtype: Optional[Dtype] = None,
    device: Optional[Device] = None,
) -> Array:
    """
    Return a new array with the specified shape and type, filled with zeros.
    """
    from .array_object import Array

   ...

    if dtype is None:
       dtype = ak.Int64

    return Array._new(ak.zeros(shape, dtype))

ajpotts avatar Aug 28 '24 16:08 ajpotts