def DEFAULT_BDRY_THETA_MIN(r,u,d):
ushape = u.shape
num_vars = np.prod(ushape[:-2])
uflat = u.reshape(tuple([num_vars])+ushape[-2:])
out = np.empty_like(uflat)
for i in range(out.shape[0]):
out[i] = d(uflat[i],0,1)
out.reshape(ushape)
return out
评论列表
文章目录