You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
~/.cache/pypoetry/virtualenvs/gsw-xarray-NsrEXKiZ-py3.8/lib/python3.8/site-packages/gsw/geostrophy.pyingeo_strf_dyn_height(SA, CT, p, p_ref, axis, max_dp, interp_method)
53raiseValueError('interp_method must be one of %s'54% (interp_methods.keys(),))
--->55ifSA.shape!=CT.shape:
56raiseValueError('Shapes of SA and CT must match; found %s and %s'57% (SA.shape, CT.shape))
AttributeError: 'list'objecthasnoattribute'shape'
Solution
I see 2 solutions:
fix it in gsw
Convert iterables into numpy arrays in gsw-xarray
I guess that 1. is the cleanest
@efiring do you want me to open an issue / PR in GSW-Python to fix this upstream, or do you have any comment on this?
The text was updated successfully, but these errors were encountered:
Description
Due to transformation of all args into kwargs in gsw-xarray, this lead to incompatible behavior.
In gsw, they transform iterables into numpy arrays when used in args, but not when used in kwargs https://github.com/TEOS-10/GSW-Python/blob/d75dfe5454fd3050bb36ab92c08ba77fcf087f8f/gsw/_utilities.py#L18-L57
As gsw-xarray will now transform every args into a kwargs, this makes it lose this compatibility.
Minimal example
Error raised
Solution
I see 2 solutions:
I guess that 1. is the cleanest
@efiring do you want me to open an issue / PR in GSW-Python to fix this upstream, or do you have any comment on this?
The text was updated successfully, but these errors were encountered: