From d065ae199358ab62727ebb2672e1d9c813784b45 Mon Sep 17 00:00:00 2001 From: lykos98 Date: Fri, 23 Feb 2024 19:59:18 +0100 Subject: [PATCH] added fallback for macos if dadac not compiled properly --- dadapy/clustering.py | 6 +++++- setup.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dadapy/clustering.py b/dadapy/clustering.py index f4c1d4fd..40651f55 100644 --- a/dadapy/clustering.py +++ b/dadapy/clustering.py @@ -20,6 +20,7 @@ """ import multiprocessing +import platform import time import warnings @@ -115,7 +116,10 @@ def compute_clustering_ADP(self, Z=1.65, halo=False, impl="c", v2=False): dadac_handler = c_data(self.X, verbose=self.verb) except NameError: warnings.warn( - """Cannot load dadac.Data, falling back to python/cython implementation""", + f"""Cannot load dadac.Data, falling back to python/cython implementation. + This is can be caused from the fact that you are running from a non Linux system. + Your platform, is {platform.platform()}, please refer to dadaC docs to manually install + the package""", stacklevel=2, ) impl = "py" diff --git a/setup.py b/setup.py index fdc74bb3..a6bc3e52 100644 --- a/setup.py +++ b/setup.py @@ -83,7 +83,7 @@ def __str__(self): sources=["dadapy/_cython/cython_differentiable_imbalance.c"], include_dirs=[get_numpy_include()], define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")], - ) + ), ] extra_compile_args = (["-fopenmp"],)