-
Notifications
You must be signed in to change notification settings - Fork 215
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
Transformer.transform exception with empty inputs #766
Comments
@jleinonen, sounds like a reasonable change to me. Do you have any interest to submit a PR with the change? |
Hmm, I suppose I could add something to this specific function, but I would guess that similar behavior exists in other functions in PyPROJ. At least the deprecated function |
Thanks for the report 👍 |
Thanks for the fix! |
Calling
Transformer.transform
with empty inputs results in a ProjError.Code Sample
Problem description
The
Transformer.transform
function raises an error with a nondescriptive error message if the inputs are empty lists or arrays:Expected Output
In my view, calling
Transformer.transform
with empty inputs should result in empty outputs without errors. This is standard NumPy behavior.If the devs have some reason that this should raise an error, then at least the exception should have a descriptive error message.
Environment Information
Installation method
Installed from conda.
Conda environment information (if you installed with conda):
Environment (
conda list
):Details about
conda
and system (conda info
):The text was updated successfully, but these errors were encountered: