Skip to content

Commit

Permalink
use faster asarray for numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorStoneAstro committed Nov 5, 2024
1 parent c46ceda commit acfe438
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pqm/pqm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit acfe438

Please sign in to comment.