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

Error from pad default arguments #211

Open
mdtanker opened this issue Dec 6, 2024 · 0 comments
Open

Error from pad default arguments #211

mdtanker opened this issue Dec 6, 2024 · 0 comments

Comments

@mdtanker
Copy link

mdtanker commented Dec 6, 2024

I was trying to pad a grid with method="linear_ramp", but received the following error:

ValueError: unsupported keyword arguments for mode 'linear_ramp': {'constant_values'}

This seems to be due to constant_values defaulting to 0 instead of None. Pad works fine when I manually set constant_values=None, as below.

pad_width = {
        "northing": 10,
        "easting": 10,
}
xrft.pad(
    grid,
    pad_width,
    mode="linear_ramp",
    constant_values=None,
)

Maybe this can be fixed with switching the default value of constant_value to None for all methods except for constant, or a warning can be raised to manually set constant to None.

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