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

ENH: improved type support for numpy arrays #34

Merged
merged 4 commits into from
Mar 22, 2024
Merged

Conversation

ntessore
Copy link
Owner

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.

@ntessore ntessore merged commit 9415590 into main Mar 22, 2024
18 checks passed
@ntessore ntessore deleted the feat/type-safe-arrays branch March 22, 2024 00:05
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.

1 participant