Remove scipy import
"""Module for RBF interpolation."""
+import math
import warnings
from itertools import combinations_with_replacement
import cupy as cp
-from scipy.spatial import KDTree # FIXME
-from scipy.special import comb # FIXME
+#from scipy.spatial import KDTree # FIXME
# Define the kernel functions.
@@ -412,7 +412,7 @@ def _monomial_powers(ndim, degree):
monomial.
"""
- nmonos = comb(degree + ndim, ndim, exact=True)
+ nmonos = math.comb(degree + ndim, ndim)
out = cp.zeros((nmonos, ndim), dtype=int)
count = 0
for deg in range(degree + 1):
@@ -673,7 +673,7 @@ class RBFInterpolator:
else:
raise NotImplementedError
- self._tree = KDTree(y)
+ # self._tree = KDTree(y)
self.y = y
self.d = d
