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
Units.conform behavior varies depending on arguments #9
Comments
Thanks, Jim. I'll investigate ... |
Hi Jim, The first case ( In the fourth case ( However, the code was clearly somewhat relaxed about this, and it is absolutely not unreasonable for it to work with lists or tuples as well. What is a bit harder is to get it to return and list or tuple when a one was provided (because it has to be converted to numpy internally to interact with the udunits2 C library), especially if an input tuple is nested. I propose changing the code so that a list or tuple input always works, but always returns a numpy array in this case:
prints:
How does that sound? |
That sounds great! |
Thanks - the new version, 3.2.8, will be ready in PyPi later today. |
Fox for Units.conform behavior varies depending on arguments (#9)
Great package!
I'm using cfunits 3.2.7 installed via conda from conda-forge (build pyh9f0ad1d_0) with Python 3.8.2.
The code below will produce an error on the first case, pass on the middle two, and fail on the last. There is different behavior depending on whether or not the from_units and to_units are the same or not.
The text was updated successfully, but these errors were encountered: