-rw-r--r-- | src/language/commands/quick-cluster.c | 4 | ||||
-rw-r--r-- | tests/language/commands/quick-cluster.at | 8 |
diff --git a/src/language/commands/quick-cluster.c b/src/language/commands/quick-cluster.c index 128130afe..cb5817006 100644 --- a/src/language/commands/quick-cluster.c +++ b/src/language/commands/quick-cluster.c @@ -549,9 +549,7 @@ quick_cluster_show_centers (struct Kmeans *kmeans, bool initial, const struct qc for (size_t j = 0; j < qc->n_vars; j++) { double x = gsl_matrix_get (matrix, kmeans->group_order->data[i], j); - union value v = { .f = x }; - pivot_table_put2 (table, i, j, - pivot_value_new_var_value (qc->vars[j], &v)); + pivot_table_put2 (table, i, j, pivot_value_new_number (x)); } pivot_table_submit (table); diff --git a/tests/language/commands/quick-cluster.at b/tests/language/commands/quick-cluster.at index 12f4b2ac4..f467d1d6b 100644 --- a/tests/language/commands/quick-cluster.at +++ b/tests/language/commands/quick-cluster.at @@ -350,14 +350,14 @@ AT_CHECK([pspp -O format=csv quick-cluster.sps], [0], [dnl Table: Initial Cluster Centers ,Cluster,, ,1,2,3 -x,-11,-12,11 -y,-12,11,11 +x,-10.80,-11.65,11.10 +y,-11.76,10.81,10.91 Table: Final Cluster Centers ,Cluster,, ,1,2,3 -x,-10,-10,10 -y,-10,10,10 +x,-10.22,-10.14,10.28 +y,-10.01,10.22,9.89 Table: Number of Cases in each Cluster ,,Count |