Skip to content

BUG: size returns nan for Dask array with unknown shape #175

Closed as not planned
@lucascolley

Description

@lucascolley
>>> xp
<module 'scipy._lib.array_api_compat.dask.array' from ...
>>> x = xp.asarray([1, 2, 3])            
>>> x
dask.array<array, shape=(3,), dtype=int64, chunksize=(3,), chunktype=numpy.ndarray>
>>> from scipy._lib.array_api_compat import size
>>> size(xp.unique_values(x))
nan
>>> size(xp.unique_values(x).compute())
3

I think size should call compute() if it has to?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions