From acfe43896748e5d5fa2b1b41e2c71f7fb6cdd497 Mon Sep 17 00:00:00 2001 From: Connor Stone Date: Tue, 5 Nov 2024 17:18:20 -0500 Subject: [PATCH] use faster asarray for numpy --- src/pqm/pqm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pqm/pqm.py b/src/pqm/pqm.py index 7a422df..540c51c 100644 --- a/src/pqm/pqm.py +++ b/src/pqm/pqm.py @@ -89,8 +89,8 @@ def _pqm_test( ), f"x_samples and y_samples must be of the same type, not {type(x_samples)} and {type(y_samples)}" is_torch = isinstance(x_samples, torch.Tensor) and isinstance(y_samples, torch.Tensor) if not is_torch: - x_samples = np.array(x_samples) - y_samples = np.array(y_samples) + x_samples = np.asarray(x_samples) + y_samples = np.asarray(y_samples) # Validate sample sizes nx = x_samples.shape[0]