Skip to content

Conversation

@will-moore
Copy link
Member

@will-moore will-moore commented Sep 17, 2025

Fixes #495

The gaussian and laplacian scaler functions don't preserve dtype - see issue above.

I looked at tests and there's 2 issues...

  • The check_downscaled function

    def check_downscaled(self, downscaled, shape, scale_factor=2):
    only checks that various levels of the pyramid have the same dype as the new 0 level of the same pyramid - but this is NOT the same as the input dtype. In the bug above, ALL levels of the pyramid were float64 when the input was int16 - Fixed this test in the 2nd commit below.

  • The tests

    def test_laplacian(self, shape):
    and
    def test_gaussian(self, shape):
    were marked as "fail" because the test asserts that pyramids ONLY get downsampled in X and Y, whereas both these methods downsample in ALL dimensions. - I removed the xfail flag. These 2 tests check dtype now, but not shape.

@codecov
Copy link

codecov bot commented Sep 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.04%. Comparing base (b49986e) to head (3d8904b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #496      +/-   ##
==========================================
+ Coverage   87.02%   87.04%   +0.02%     
==========================================
  Files          13       13              
  Lines        1772     1776       +4     
==========================================
+ Hits         1542     1546       +4     
  Misses        230      230              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

The output zarr file store float dtype

1 participant