From 88fd8160005850ea73ef95b16c22df901c9461bd Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Wed, 3 Apr 2019 22:55:20 -0500 Subject: [PATCH] Remove deprecated calls to np.asscalar --- pytential/qbx/__init__.py | 2 +- pytential/qbx/geometry.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pytential/qbx/__init__.py b/pytential/qbx/__init__.py index 8961659e..2d85ee10 100644 --- a/pytential/qbx/__init__.py +++ b/pytential/qbx/__init__.py @@ -470,7 +470,7 @@ class QBXLayerPotentialSource(LayerPotentialSourceBase): def h_max(self): with cl.CommandQueue(self.cl_context) as queue: quad_res = self._coarsest_quad_resolution("npanels").with_queue(queue) - return np.asscalar(cl.array.max(quad_res).get()) + return cl.array.max(quad_res).get().item() # {{{ internal API diff --git a/pytential/qbx/geometry.py b/pytential/qbx/geometry.py index ee442184..4eadefbe 100644 --- a/pytential/qbx/geometry.py +++ b/pytential/qbx/geometry.py @@ -779,7 +779,7 @@ class QBXFMMGeometryData(object): tree_ttc, filtered_tree_ttc, filtered_target_ids, count, queue=queue, size=len(tree_ttc)) - count = np.asscalar(count.get()) + count = count.get().item() filtered_tree_ttc = filtered_tree_ttc[:count] filtered_target_ids = filtered_target_ids[:count].copy() -- GitLab