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
ret= [] # Returned variable means in layerlayer_arg=get_layer(pressure, *args, height=height,
bottom=bottom, depth=depth)
layer_p=layer_arg[0]
layer_arg=layer_arg[1:]
# Taking the integral of the weights (pressure) to feed into the weighting# function. Said integral works out to this function:pres_int=0.5* (layer_p[-1]**2-layer_p[0]**2)
fori, _datavarinenumerate(args):
arg_mean=np.trapz((layer_arg[i] *layer_p),
x=layer_p) /pres_intret.append(arg_mean)
So it's iterating over an enumeration but not actually using what it's looping over, so that could be better. I think this could probably be reduced to returning a list comprehension, but not completely sure. We should also double check any other places that are using enumerate.
The text was updated successfully, but these errors were encountered:
Right now this looks like:
So it's iterating over an enumeration but not actually using what it's looping over, so that could be better. I think this could probably be reduced to returning a list comprehension, but not completely sure. We should also double check any other places that are using
enumerate
.The text was updated successfully, but these errors were encountered: