From f1c85f42cfdab051599d2e2b5157c1fb447ebfad Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Tue, 18 Oct 2016 10:10:42 +0200 Subject: fix problems with dense ZV computation when data->n < model->n --- src/gensvm_zv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gensvm_zv.c') diff --git a/src/gensvm_zv.c b/src/gensvm_zv.c index 81a5354..05950ea 100644 --- a/src/gensvm_zv.c +++ b/src/gensvm_zv.c @@ -106,7 +106,8 @@ void gensvm_calculate_ZV_sparse(struct GenModel *model, void gensvm_calculate_ZV_dense(struct GenModel *model, struct GenData *data, double *ZV) { - long n = model->n; + // use n from data, assume m and K are the same between model and data + long n = data->n; long m = model->m; long K = model->K; -- cgit v1.2.3