From 5e3f2e1aa356fed16cd0f292c7d3221b13782c80 Mon Sep 17 00:00:00 2001 From: Zach <20629897+craymichael@users.noreply.github.com> Date: Sat, 9 Jan 2021 07:55:25 +0000 Subject: [PATCH] Fix error with data ownership in cholesky Require that the fill-reducing permutation P of Cholesky factorizer owns its data before use. Fixes #271 --- pygam/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pygam/utils.py b/pygam/utils.py index ff5ea004..2da6bfc4 100644 --- a/pygam/utils.py +++ b/pygam/utils.py @@ -56,6 +56,8 @@ def cholesky(A, sparse=True, verbose=True): # permutation matrix P P = sp.sparse.lil_matrix(A.shape) p = F.P() + # require OWNDATA = True + p = np.require(p, requirements='O') P[np.arange(len(p)), p] = 1 # permute