From 70182813e8fac55c68cffaa86f76ba6a25074054 Mon Sep 17 00:00:00 2001 From: Domagoj Fijan Date: Tue, 21 Jan 2025 13:51:26 -0500 Subject: [PATCH] fixes to compute calls --- freud/environment.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/freud/environment.py b/freud/environment.py index 74964f93b..7d0b63b10 100644 --- a/freud/environment.py +++ b/freud/environment.py @@ -639,8 +639,7 @@ def point_environments(self): """:math:`\\left(N_{points}, N_{neighbors}, 3\\right)` list[:class:`numpy.ndarray`]: All environments for all points.""" envs = self._cpp_obj.getPointEnvironments() - return [np.asarray([[p.x, p.y, p.z] for p in env]) - for env in envs] + return [np.asarray(env) for env in envs] def __repr__(self): return (f"freud.environment.{type(self).__name__}()") @@ -772,6 +771,7 @@ def compute(self, system, threshold, cluster_neighbors=None, self._cpp_obj.compute( nq._cpp_obj, + nlist._cpp_obj, qargs._cpp_obj, env_nlist._cpp_obj, env_qargs._cpp_obj, @@ -795,8 +795,7 @@ def cluster_environments(self): """:math:`\\left(N_{clusters}, N_{neighbors}, 3\\right)` list[:class:`numpy.ndarray`]: The environments for all clusters.""" envs = self._cpp_obj.getClusterEnvironments() - return [np.asarray([[p.x, p.y, p.z] for p in env]) - for env in envs] + return [np.asarray(env) for env in envs] def plot(self, ax=None): """Plot cluster distribution.