Skip to content

Commit

Permalink
ENH: improved type support for numpy arrays (#34)
Browse files Browse the repository at this point in the history
This change improves type support for numpy arrays in two ways:

1. Do not require numpy arrays to be aligned and contiguous. This fixes
an issue with conversion from or to arrays of different int width.

2. Use numpy data types in C interface. Instead of treating numpy array
data as the C types `int64_t` etc., the code now uses `npy_int64` etc.
to match the `NPY_INT64` dtype descriptor.

A related change is to use `order` instead of `nside` for the UNIQ pixel
indexing functions. This is a backward-incompatible change, but the
functions are fairly new and not used much.
  • Loading branch information
ntessore authored Mar 22, 2024
1 parent b6400f1 commit 9415590
Show file tree
Hide file tree
Showing 10 changed files with 631 additions and 286 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
tests:
name: Tests
strategy:
fail-fast: false
matrix:
runs-on:
- ubuntu-latest
- macos-latest
- windows-latest
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: pip install '.[test]'
- run: pytest -v --pyargs healpix
Loading

0 comments on commit 9415590

Please sign in to comment.