Esempio n. 1
0
    def eval_y(self, y):
        tx, ty, c, nx, ny, kx, ky, wx, wy, ier = self._args()
        y = cont(y, np.float64)
        my = y.size
        C = np.zeros(my * wx)

        ddierckx.splevv(ty, c, ky, y, C, wx, ier)
        C = C.reshape((my, wx))
        return [Spline._from_tck((tx, c, kx)) for c in C]
Esempio n. 2
0
    def eval_x(self, x):
        tx, ty, c, nx, ny, kx, ky, wx, wy, ier = self._args()
        x = cont(x, np.float64)
        mx = x.size
        C = np.zeros(mx * wy)

        c = c.reshape((wx, wy)).T.ravel().copy()
        ddierckx.splevv(tx, c, kx, x, C, wy, ier)
        C = C.reshape((mx, wy))
        return [Spline._from_tck((ty, c, ky)) for c in C]
Esempio n. 3
0
    def eval_yx(self, x, y):
        tx, ty, c, nx, ny, kx, ky, wx, wy, ier = self._args()
        x, y = cont(x, np.float64), cont(y, np.float64)
        mx, my = x.size, y.size
        C = np.zeros(my * wx)
        z = np.zeros(mx * my)

        ddierckx.splevv(ty, c, ky, y, C, wx, ier)
        ddierckx.splevv(tx, C, kx, x, z, my, ier)
        z = z.reshape((mx, my))
        return z, C
Esempio n. 4
0
    def eval_xy(self, x, y):
        tx, ty, c, nx, ny, kx, ky, wx, wy, ier = self._args()
        x, y = cont(x, np.float64), cont(y, np.float64)
        mx, my = x.size, y.size
        C = np.zeros(mx * wy)
        z = np.zeros(mx * my)

        c = c.reshape((wx, wy)).T.ravel().copy()
        ddierckx.splevv(tx, c, kx, x, C, wy, ier)
        ddierckx.splevv(ty, C, ky, y, z, mx, ier)
        z = z.reshape((my, mx)).T
        return z, C
Esempio n. 5
0
    def __call__(self, x, y):
        x, y = cont(x, np.float64), cont(y, np.float64)
        mx, my = x.size, y.size
        kx, ky = self.k
        tx, ty = self.t
        wx, wy = self.w

        c = self.c
        C = np.zeros(my * wx)
        z = np.zeros(mx * my)

        ier = 0
        ddierckx.splevv(ty, c, ky, y, C, wx, ier)
        ddierckx.splevv(tx, C, kx, x, z, my, ier)
        return z.reshape((mx, my))