diff --git a/src/glum/_glm.py b/src/glum/_glm.py index 94b0f13d..8ba42314 100644 --- a/src/glum/_glm.py +++ b/src/glum/_glm.py @@ -1621,7 +1621,7 @@ def covariance_matrix( / (sum_weights - self.n_features_in_ - int(self.fit_intercept)) ) else: - inner_part = gradient.sandwich(np.ones_like(y)) + inner_part = gradient.sandwich(np.ones_like(y, dtype=X.dtype)) correction = sum_weights / ( sum_weights - self.n_features_in_ - int(self.fit_intercept) )