Skip to content

Commit 273d4f3

Browse files
committed
[JTH] add tests with real data for gps and corrected bug in kma tests in macOS
1 parent f7b06e1 commit 273d4f3

File tree

4 files changed

+2648
-1
lines changed

4 files changed

+2648
-1
lines changed

bluemath_tk/datamining/kma.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
Status: Under development (Working)
88
"""
99

10+
import platform
11+
1012
import numpy as np
1113
import pandas as pd
1214
from scipy.spatial.distance import cdist
@@ -269,12 +271,17 @@ def _create_pyclustering_model(
269271

270272
# Build kwargs for pyclustering
271273
kwargs = {}
274+
# Use Python implementation (ccore=False) on macOS to avoid architecture
275+
# compatibility issues with the native C++ library (x86_64 vs arm64)
276+
# On other platforms, use the faster C++ implementation (ccore=True, default)
277+
if platform.system() == "Darwin": # macOS
278+
kwargs["ccore"] = False
272279
if self.distance_metric is not None:
273280
# Map common metric names to pyclustering format if needed
274-
kwargs["ccore"] = False # Use Python implementation
275281
# Note: pyclustering's distance metric handling varies by algorithm
276282
# For simplicity, we'll let pyclustering use defaults
277283
# Advanced users can modify the model directly if needed
284+
pass
278285

279286
# Import and create the appropriate algorithm
280287
if self.algorithm_name == "kmeans":

0 commit comments

Comments
 (0)