HARKinterpolation.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:HARK 作者: econ-ark 项目源码 文件源码
def _derY(self,x,y,z):
        '''
        Returns the first derivative of the function with respect to Y at each
        value in (x,y,z).  Only called internally by HARKinterpolator3D._derY.
        '''
        m = len(x)
        temp = np.zeros((m,self.funcCount))
        for j in range(self.funcCount):
            temp[:,j] = self.functions[j](x,y,z)
        temp[np.isnan(temp)] = np.inf
        i = np.argmin(temp,axis=1)
        y = temp[np.arange(m),i]
        dfdy = np.zeros_like(x)
        for j in range(self.funcCount):
            c = i == j
            dfdy[c] = self.functions[j].derivativeY(x[c],y[c],z[c])
        return dfdy
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号