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

Update NaN block size tests for threshold_local function #289

Merged
merged 2 commits into from
Mar 14, 2023

Conversation

GenevieveBuckley
Copy link
Collaborator

Closes #256

This PR:

  1. Removes some unnecessary tests. I wrote the tests several years ago, and I don't think there was a good reason to have them in there. It looks like I just wanted to have higher test code coverage at the time
  2. It also explicitly specifies the like= kwarg when computing sigma from block_size for the gaussian local threshold function. I've found an edge case where da.asarray(cupy_array) correctly creates a dask array with cupy chunks, but da.asarray(cupy.nan) doesn't make a cupy-backed dask array (because type(cupy.nan) returns float). To avoid this problem, we use the like= kwarg to match the array type to the input image type.

@GenevieveBuckley GenevieveBuckley changed the title Issue 256 Update NaN block size tests for threshold_local function Mar 14, 2023
@GenevieveBuckley GenevieveBuckley merged commit 69989c7 into dask:main Mar 14, 2023
@GenevieveBuckley GenevieveBuckley deleted the issue-256 branch March 14, 2023 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestInvalidArguments.test_nan_blocksize fails on aarch64
1 participant