Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the behavior of converting a Dask array to a Python number #10686

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bouweandela
Copy link
Contributor

@bouweandela bouweandela commented Dec 11, 2023

Document the behavior when converting Dask arrays to Python numbers (bool/int/float/complex): https://dask--10686.org.readthedocs.build/en/10686/array-api.html#array

I noticed that there was some discussion on whether or not this is a desirable feature in #9387, but I thought it would be useful to document it anyway as this will help to avoid confusion.

For us, this feature is quite useful because it allows us to write e.g.

if a.any():
    do_something()

and that will work regardless of whether a is a numpy or a Dask array.

  • Closes #xxxx
  • Tests added / passed
  • Passes pre-commit run --all-files

@GPUtester
Copy link
Collaborator

Can one of the admins verify this patch?

Admins can comment ok to test to allow this one PR to run or add to allowlist to allow all future PRs from the same author to run.

@bouweandela

This comment was marked as outdated.

@bouweandela bouweandela marked this pull request as ready for review December 11, 2023 12:46
@bouweandela bouweandela force-pushed the add-docs-for-python-number-conversions branch from 062718c to d638f45 Compare December 18, 2023 10:48
@bouweandela bouweandela force-pushed the add-docs-for-python-number-conversions branch from d638f45 to db2b3bc Compare January 17, 2024 14:28
Copy link
Contributor

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

     15 files  +     12       15 suites  +12   3h 26m 42s ⏱️ + 3h 21m 39s
 12 941 tests +  7 769   11 675 ✅ +  7 272     929 💤 +   160  337 ❌ +337 
160 329 runs  +153 166  143 060 ✅ +137 082  16 932 💤 +15 747  337 ❌ +337 

For more details on these failures, see this check.

Results for commit db2b3bc. ± Comparison against base commit dde25d9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
array documentation Improve or add to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants