Skip to content

allow_dask_compute argument of lazy_xp_function domain #415

@ev-br

Description

@ev-br

lazy_xp_function' accepts its allow_dask_compute argument as either bool or int where True is equivalent to a very large integer:

    allow_dask_compute : bool | int, optional
        Whether `func` is allowed to internally materialize the Dask graph, or maximum
        number of times it is allowed to do so. 

This is very much unexpected. First of all, bool | int typing is equivalent to just int. So I'd expect that either False is converted to zero, or an int gets converted to a boolean via bool(allow_dask_compute).

Since the "number of times" is non-negative, I'd very much expect to express "any number of times" as -1 or just negative.

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