diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6e67c74..155db90 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -50,7 +50,18 @@ jobs: - run: pip install -c .github/test-constraints.txt '.[test]' - run: pytest --cov=heracles --cov-report=lcov - uses: coverallsapp/github-action@v2 - + - name: Cache data for Notebook tests + id: cache-data + uses: actions/cache@v4 + with: + path: ./examples + key: ${{ runner.os }}-data-${{ github.run_number }}-${{ hashFiles('catalog.fits') }} + restore-keys: | + ${{ runner.os }}-data + - run: pip install jupyter pipx + - run: pipx runpip install numpy matplotlib ducc0 healpy + - run: pipx run jupyter execute examples/example.ipynb + build: name: Build runs-on: ubuntu-latest diff --git a/heracles/healpy.py b/heracles/healpy.py index 7fd0912..5290f02 100644 --- a/heracles/healpy.py +++ b/heracles/healpy.py @@ -48,7 +48,7 @@ def wrapper(*args): newargs = [] for arr in args: if arr.dtype.byteorder != "=": - arr = arr.newbyteorder("=").byteswap() + arr = arr.view(arr.dtype.newbyteorder('=')).byteswap() newargs.append(arr) return fn(*newargs)