From 8133f74c40ce64a675876d3a91d2a22618489452 Mon Sep 17 00:00:00 2001 From: Stephen Bailey Date: Wed, 3 Jan 2024 15:33:18 -0800 Subject: [PATCH] fix crash in gpu mode with archetype legendre priors --- py/redrock/zscan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/redrock/zscan.py b/py/redrock/zscan.py index 8cd5eeff..b09bf21e 100644 --- a/py/redrock/zscan.py +++ b/py/redrock/zscan.py @@ -689,7 +689,7 @@ def calc_zchi2_batch(spectra, tdata, weights, flux, wflux, nz, nbasis, solve_mat #all_M = calc_batch_dot_product_3d3d_gpu(cp.ascontiguousarray(Tbs.swapaxes(-2, -1)), (weights[None, :, None] * Tbs)) #all_y = (Tbs.swapaxes(-2, -1) @ wflux) if prior is not None: - all_M += prior + all_M += cp.asarray(prior) #3) Use new helper method solve_matrices to use appropriate method #for this template to solve for zcoeff in batch for all_M and all_y.