X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Fcovariance.c;h=f64e89d1eb2ffbee673c2179e6d2e48b78d066f3;hb=dc29c57e7908b0bdc6ab84f8aa4b7cb8a780026c;hp=b37da3d22930732878dae815c4435efaad8edbe1;hpb=d18270eb353b0f8ed23814be18f1de69c4001262;p=pspp diff --git a/src/math/covariance.c b/src/math/covariance.c index b37da3d229..f64e89d1eb 100644 --- a/src/math/covariance.c +++ b/src/math/covariance.c @@ -347,6 +347,9 @@ covariance_accumulate_pass2 (struct covariance *cov, const struct ccase *c) assert (cov->state == 1); cov->state = 2; + if (cov->categoricals) + categoricals_done (cov->categoricals); + cov->dim = cov->n_vars; if (cov->categoricals) @@ -362,9 +365,6 @@ covariance_accumulate_pass2 (struct covariance *cov, const struct ccase *c) cov->moments[i] = resize_matrix (cov->moments[i], cov->dim); } - // if (cov->categoricals) - // categoricals_done (cov->categoricals); - /* Populate the moments matrices with the categorical value elements */ for (i = cov->n_vars; i < cov->dim; ++i) {