Skip to content

Remove shape_out as an explicit kwarg from reproject_to #686

@wtbarnes

Description

@wtbarnes

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions