From 3fe8ecf31451443fff72d5d55058fcf0dc224e5a Mon Sep 17 00:00:00 2001 From: Duncan Watson-Parris Date: Wed, 24 May 2023 03:47:41 +0100 Subject: [PATCH] Remove np type --- cis/collocation/kdtree.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cis/collocation/kdtree.py b/cis/collocation/kdtree.py index f6c12578..5336c24e 100644 --- a/cis/collocation/kdtree.py +++ b/cis/collocation/kdtree.py @@ -735,8 +735,8 @@ def query(self, x, k=1, eps=0, p=2, distance_upper_bound=np.inf): retshape = np.shape(x)[:-1] if retshape != (): if k is None: - dd = np.empty(retshape, dtype=np.object) - ii = np.empty(retshape, dtype=np.object) + dd = np.empty(retshape, dtype=object) + ii = np.empty(retshape, dtype=object) elif k > 1: dd = np.empty(retshape + (k,), dtype=float) dd.fill(np.inf) @@ -854,7 +854,7 @@ def query_ball_point(self, x, r, p=2., eps=0): return self._query_ball_point(x, r, p, eps) else: retshape = x.shape[:-1] - result = np.empty(retshape, dtype=np.object) + result = np.empty(retshape, dtype=object) for c in np.ndindex(retshape): result[c] = self._query_ball_point(x[c], r, p=p, eps=eps) return result