Esempio n. 1
0
 def ev(self, xi, yi):
     """
     Evaluate spline at points (x[i], y[i]), i=0,...,len(x)-1
     """
     tx,ty,c = self.tck[:3]
     kx,ky = self.degrees
     zi,ier = dfitpack.bispeu(tx,ty,c,kx,ky,xi,yi)
     assert ier==0, 'Invalid input: ier='+`ier`
     return zi
Esempio n. 2
0
 def ev(self, xi, yi):
     """
     Evaluate spline at points (x[i], y[i]), i=0,...,len(x)-1
     """
     tx,ty,c = self.tck[:3]
     kx,ky = self.degrees
     zi,ier = dfitpack.bispeu(tx,ty,c,kx,ky,xi,yi)
     assert ier==0, 'Invalid input: ier='+`ier`
     return zi
Esempio n. 3
0
 def ev(self, xi, yi):
     """
     Evaluate spline at points (x[i], y[i]), i=0,...,len(x)-1
     """
     tx, ty, c = self.tck[:3]
     kx, ky = self.degrees
     zi, ier = dfitpack.bispeu(tx, ty, c, kx, ky, xi, yi)
     if not ier == 0:
         raise ValueError("Error code returned by bispeu: %s" % ier)
     return zi
Esempio n. 4
0
 def ev(self, xi, yi):
     """
     Evaluate spline at points (x[i], y[i]), i=0,...,len(x)-1
     """
     tx,ty,c = self.tck[:3]
     kx,ky = self.degrees
     zi,ier = dfitpack.bispeu(tx,ty,c,kx,ky,xi,yi)
     if not ier == 0:
         raise ValueError("Error code returned by bispeu: %s" % ier)
     return zi
Esempio n. 5
0
 def ev(self, thetai, phii):
     """ Evaluate the spline at the points (theta[i], phi[i]),
     i=0,...,len(theta)-1
     """
     thetai = np.asarray(thetai)
     phii = np.asarray(phii)
     # empty input yields empty output
     if (thetai.size == 0) and (phii.size == 0):
         return array([])
     if thetai.min() < 0. or thetai.max() > np.pi:
         raise ValueError("requested thetai out of bounds.")
     if phii.min() < 0. or phii.max() > 2. * np.pi:
         raise ValueError("requested phii out of bounds.")
     tx, ty, c = self.tck[:3]
     kx, ky = self.degrees
     zi, ier = dfitpack.bispeu(tx, ty, c, kx, ky, thetai, phii)
     if not ier == 0:
         raise ValueError("Error code returned by bispeu: %s" % ier)
     return zi
Esempio n. 6
0
File: fitpack2.py Progetto: 87/scipy
 def ev(self, thetai, phii):
     """ Evaluate the spline at the points (theta[i], phi[i]),
     i=0,...,len(theta)-1
     """
     thetai = np.asarray(thetai)
     phii = np.asarray(phii)
     # empty input yields empty output
     if (thetai.size == 0) and (phii.size == 0):
         return array([])
     if thetai.min() < 0. or thetai.max() > np.pi:
         raise ValueError("requested thetai out of bounds.")
     if phii.min() < 0. or phii.max() > 2. * np.pi:
         raise ValueError("requested phii out of bounds.")
     tx, ty, c = self.tck[:3]
     kx, ky = self.degrees
     zi, ier = dfitpack.bispeu(tx, ty, c, kx, ky, thetai, phii)
     if not ier == 0:
         raise ValueError("Error code returned by bispeu: %s" % ier)
     return zi