pspp.git - GNU PSPP

index : pspp.git
GNU PSPP
summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat
-rw-r--r--src/language/commands/quick-cluster.c 4
-rw-r--r--tests/language/commands/quick-cluster.at 8
2 files changed, 5 insertions, 7 deletions
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
generated by cgit v1.2.3 (git 2.39.1) at 2025年10月04日 03:19:21 +0000

AltStyle によって変換されたページ (->オリジナル) /