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

Remove shape_out as an explicit kwarg from reproject_to #686

Open
wtbarnes opened this issue Apr 23, 2024 · 0 comments
Open

Remove shape_out as an explicit kwarg from reproject_to #686

wtbarnes opened this issue Apr 23, 2024 · 0 comments

Comments

@wtbarnes
Copy link
Member

Provide a general description of the issue or problem.

The reproject_to method explicitly has a shape_out keyword argument. Previously, the reason for this was because the shape_out needed to potentially be manually extracted from the low-level WCS:

ndcube/ndcube/ndcube.py

Lines 759 to 766 in 64b5f99

# TODO: Upstream this check into reproject
# If shape_out is not specified explicitly,
# try to extract it from the low level WCS
if not shape_out:
if hasattr(low_level_target_wcs, 'array_shape') and low_level_target_wcs.array_shape is not None:
shape_out = low_level_target_wcs.array_shape
else:
raise ValueError("shape_out must be specified if target_wcs does not have the array_shape attribute.")

However, this logic is now included in reproject_to as of v0.11.1. Currently, due to the minimum version policy, we need to continue support versions older than v0.11.1. Once that period has passed, shape_out can be removed as an explicit keyword argument and the above logic can be removed.

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

No branches or pull requests

1 participant