Skip to content

Commit

Permalink
Remove np type
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanwp authored May 24, 2023
1 parent 1529f79 commit 3fe8ecf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cis/collocation/kdtree.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3fe8ecf

Please sign in to comment.