Commit 262b46d3 authored by Eva Börgens's avatar Eva Börgens
Browse files

Merge branch 'balidak-master-patch-76979' into 'master'

attempt to fix >AttributeError: "list" object has no attribute "shape"< in...

See merge request !1
parents bea6b436 c7738b83
......@@ -443,12 +443,12 @@ def vectorize_std(grid_std: np.ndarray, lon: np.ndarray,
size [t,l]
t = grid_std.shape[0]
l = region_coords.shape[0]
t = np.shape(grid_std)[0]
l = np.shape(region_coords)[0]
Lon_grid, Lat_grid = np.meshgrid(lon, lat)
std_vec = np.zeros(t,l)
std_vec = np.zeros((t,l), dtype=float, order='C')
for i in range(t):
if len(np.unique(grid_std[i][~np.isnan(grid_std[i])]))==1:
......@@ -457,4 +457,4 @@ def vectorize_std(grid_std: np.ndarray, lon: np.ndarray,
f = interp.interp2d(Lon_grid.ravel(), Lat_grid.ravel(),grid_std[i].ravel() )
std_vec[i,:] = f(region_coords[:,0], region_coords[:,1])
return std_vec
\ No newline at end of file
return std_vec
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment