Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDBSCAN throwing TypeError #263

Open
zoccoler opened this issue Aug 10, 2023 · 5 comments
Open

HDBSCAN throwing TypeError #263

zoccoler opened this issue Aug 10, 2023 · 5 comments

Comments

@zoccoler
Copy link
Collaborator

Even with napari 0.4.17, hdbscan gives me errors:

File hdbscan\\_hdbscan_tree.pyx:733, in hdbscan._hdbscan_tree.get_clusters()

TypeError: 'numpy.float64' object cannot be interpreted as an integer

It can be related to this thread: scikit-learn-contrib/hdbscan#607

For example, running this:

import hdbscan
blobs, labels = make_blobs(n_samples=2000, n_features=10)
clusterer = hdbscan.HDBSCAN()
clusterer.fit(blobs)
print(clusterer.labels_)

also throws the error.

Some relevant package versions:

  • napari 0.4.17
  • numpy 1.23.5
  • numba 0.57.1
  • hdbscan 0.8.33 (from conda-forge)
  • napari-clusters-plotter 0.7.2
  • python 3.10.12

Maybe installation with pip works, as suggested in the thread mentioned above, but I cannot install hdbscan with pip right now.

@Cryaaa
Copy link
Collaborator

Cryaaa commented Aug 10, 2023

Hey @zoccoler,
where does the make_blobs function come from? I installed the cluster plotter via pip so I could test that quickly now.

@jkmackie
Copy link

jkmackie commented Aug 10, 2023

Hey @zoccoler, where does the make_blobs function come from? I installed the cluster plotter via pip so I could test that quickly now.

He used the code from scikit-learn-contrib/hdbscan#607

from sklearn.datasets import make_blobs

By the way, I don't think napari is relevant to the type error. It is omitted from the "minimal example" from #607.

Edit: The #607 TypeError occurs with pip as the installer. My pip version is 23.2.1.

@Cryaaa
Copy link
Collaborator

Cryaaa commented Aug 10, 2023

@jkmackie thanks for the quick reply! Unfortunately I cannot reproduce the error using that code, so I'm guessing it has something to do with how hdbscan is installed. very weird...

@zoccoler
Copy link
Collaborator Author

@jkmackie I also think napari is unrelated to this. But I have hdbscan installed via conda and I do get the error when running this piece of code.

@zoccoler
Copy link
Collaborator Author

Just adding some local tests I ran with different napari versions. For me, in both cases I am getting an hdscan failed test because of the TypeError: 'numpy.float64', which is the same as the automated tests on Github here

my environment with napari 0.4.18
# packages in environment at C:\Users\mazo260d\mambaforge\envs\napari-clusters-plotter-dev-18:
#
# Name                    Version                   Build  Channel
aiofiles                  22.1.0             pyhd8ed1ab_0    conda-forge
aiosqlite                 0.19.0             pyhd8ed1ab_0    conda-forge
alabaster                 0.7.13             pyhd8ed1ab_0    conda-forge
anyio                     3.7.1              pyhd8ed1ab_0    conda-forge
aom                       3.5.0                h63175ca_0    conda-forge
apoc-backend              0.12.0             pyhd8ed1ab_0    conda-forge
app-model                 0.2.0              pyhd8ed1ab_0    conda-forge
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0           py39ha55989b_3    conda-forge
arrow                     1.2.3              pyhd8ed1ab_0    conda-forge
asciitree                 0.3.3                      py_2    conda-forge
asttokens                 2.2.1              pyhd8ed1ab_0    conda-forge
attrs                     23.1.0             pyh71513ae_1    conda-forge
autopep8                  2.0.2              pyhd8ed1ab_0    conda-forge
aws-c-auth                0.7.0                h6f3c987_2    conda-forge
aws-c-cal                 0.6.0                h6ba3258_0    conda-forge
aws-c-common              0.8.23               hcfcfb64_0    conda-forge
aws-c-compression         0.2.17               h420beca_1    conda-forge
aws-c-event-stream        0.3.1                had47b81_1    conda-forge
aws-c-http                0.7.11               h72ba615_0    conda-forge
aws-c-io                  0.13.28              ha35c040_0    conda-forge
aws-c-mqtt                0.8.14               h4941efa_2    conda-forge
aws-c-s3                  0.3.13               he04eaa7_2    conda-forge
aws-c-sdkutils            0.1.11               h420beca_1    conda-forge
aws-checksums             0.1.16               h420beca_1    conda-forge
aws-crt-cpp               0.20.3               h247a981_4    conda-forge
aws-sdk-cpp               1.10.57             h1a0519f_17    conda-forge
babel                     2.12.1             pyhd8ed1ab_1    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                pyhd8ed1ab_3    conda-forge
backports.functools_lru_cache 1.6.5              pyhd8ed1ab_0    conda-forge
beautifulsoup4            4.12.2             pyha770c72_0    conda-forge
bleach                    6.0.0              pyhd8ed1ab_0    conda-forge
blosc                     1.21.4               hdccc3a2_0    conda-forge
bokeh                     3.2.1              pyhd8ed1ab_0    conda-forge
brotli                    1.0.9                hcfcfb64_9    conda-forge
brotli-bin                1.0.9                hcfcfb64_9    conda-forge
brotli-python             1.0.9            py39h99910a6_9    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
c-ares                    1.19.1               hcfcfb64_0    conda-forge
c-blosc2                  2.10.0               h183a6f4_0    conda-forge
ca-certificates           2023.7.22            h56e8100_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
cachey                    0.2.1              pyh9f0ad1d_0    conda-forge
certifi                   2023.7.22          pyhd8ed1ab_0    conda-forge
cffi                      1.15.1           py39h68f70e3_3    conda-forge
cfitsio                   4.2.0                h9ebe7e4_0    conda-forge
charls                    2.3.4                h39d44d4_0    conda-forge
charset-normalizer        3.2.0              pyhd8ed1ab_0    conda-forge
click                     8.1.6           win_pyh7428d3b_0    conda-forge
cloudpickle               2.2.1              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
comm                      0.1.4              pyhd8ed1ab_0    conda-forge
contourpy                 1.1.0            py39h1f6ef14_0    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
cython                    0.29.36                  pypi_0    pypi
cytoolz                   0.12.2           py39ha55989b_0    conda-forge
czifile                   2019.7.2           pyh9f0ad1d_0    conda-forge
dask                      2023.7.1           pyhd8ed1ab_0    conda-forge
dask-core                 2023.7.1           pyhd8ed1ab_0    conda-forge
dav1d                     1.2.1                hcfcfb64_0    conda-forge
debugpy                   1.6.8            py39h99910a6_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
deprecated                1.2.14             pyh1a96a4e_0    conda-forge
devbio-napari             0.10.1           win_h08f2357_0    conda-forge
distributed               2023.7.1           pyhd8ed1ab_0    conda-forge
docstring_parser          0.15               pyhd8ed1ab_0    conda-forge
docutils                  0.17.1           py39hcbf5309_3    conda-forge
eigen                     3.4.0                h91493d7_0    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
exceptiongroup            1.1.2              pyhd8ed1ab_0    conda-forge
executing                 1.2.0              pyhd8ed1ab_0    conda-forge
expat                     2.5.0                h63175ca_1    conda-forge
fasteners                 0.17.3             pyhd8ed1ab_0    conda-forge
ffmpeg                    5.1.2           gpl_h5b1d025_107    conda-forge
fftw                      3.3.10          nompi_h38027f0_108    conda-forge
flit-core                 3.9.0              pyhd8ed1ab_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.14.2               hbde0cde_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.42.0           py39ha55989b_0    conda-forge
fqdn                      1.5.1              pyhd8ed1ab_0    conda-forge
freetype                  2.12.1               h546665d_1    conda-forge
freetype-py               2.4.0              pyhd8ed1ab_0    conda-forge
fsspec                    2023.6.0           pyh1a96a4e_0    conda-forge
funcsigs                  1.0.2                      py_3    conda-forge
gettext                   0.21.1               h5728263_0    conda-forge
giflib                    5.2.1                h64bf75a_3    conda-forge
glib                      2.76.4               h12be248_0    conda-forge
glib-tools                2.76.4               h12be248_0    conda-forge
gst-plugins-base          1.22.5               h001b923_0    conda-forge
gstreamer                 1.22.5               hb4038d2_0    conda-forge
hdbscan                   0.8.33           py39hbaa61f9_1    conda-forge
hdf5                      1.12.2          nompi_h57737ce_101    conda-forge
heapdict                  1.0.1                      py_0    conda-forge
hsluv                     5.0.2              pyh44b312d_0    conda-forge
icu                       70.1                 h0e60522_0    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
imagecodecs               2022.9.26        py39haf5b5c4_4    conda-forge
imagecodecs-lite          2019.12.3        py39hc266a54_6    conda-forge
imageio                   2.31.1             pyh24c5eb1_0    conda-forge
imageio-ffmpeg            0.4.8              pyhd8ed1ab_0    conda-forge
imagesize                 1.4.1              pyhd8ed1ab_0    conda-forge
importlib-metadata        6.8.0              pyha770c72_0    conda-forge
importlib-resources       6.0.0              pyhd8ed1ab_1    conda-forge
importlib_metadata        6.8.0                hd8ed1ab_0    conda-forge
importlib_resources       6.0.0              pyhd8ed1ab_1    conda-forge
in-n-out                  0.1.8              pyhd8ed1ab_0    conda-forge
iniconfig                 2.0.0              pyhd8ed1ab_0    conda-forge
intel-openmp              2023.2.0         h57928b3_49496    conda-forge
ipycanvas                 0.13.1             pyhd8ed1ab_0    conda-forge
ipyevents                 2.0.1              pyhd8ed1ab_0    conda-forge
ipykernel                 6.25.0             pyh6817e22_0    conda-forge
ipython                   8.14.0             pyh08f2357_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                8.1.0              pyhd8ed1ab_0    conda-forge
isoduration               20.11.0            pyhd8ed1ab_0    conda-forge
jedi                      0.19.0             pyhd8ed1ab_0    conda-forge
jinja2                    3.1.2              pyhd8ed1ab_1    conda-forge
joblib                    1.3.0              pyhd8ed1ab_1    conda-forge
jpeg                      9e                   h8ffe710_2    conda-forge
json5                     0.9.14             pyhd8ed1ab_0    conda-forge
jsonpointer               2.0                        py_0    conda-forge
jsonschema                4.18.6             pyhd8ed1ab_0    conda-forge
jsonschema-specifications 2023.7.1           pyhd8ed1ab_0    conda-forge
jsonschema-with-format-nongpl 4.18.6             pyhd8ed1ab_0    conda-forge
jupyter                   1.0.0            py39hcbf5309_8    conda-forge
jupyter_client            8.3.0              pyhd8ed1ab_0    conda-forge
jupyter_console           6.6.3              pyhd8ed1ab_0    conda-forge
jupyter_core              5.3.1            py39hcbf5309_0    conda-forge
jupyter_events            0.7.0              pyhd8ed1ab_1    conda-forge
jupyter_server            1.23.6             pyhd8ed1ab_0    conda-forge
jupyter_server_fileid     0.9.0              pyhd8ed1ab_0    conda-forge
jupyter_server_ydoc       0.8.0              pyhd8ed1ab_0    conda-forge
jupyter_ydoc              0.2.4              pyhd8ed1ab_0    conda-forge
jupyterlab                3.6.5              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
jupyterlab_server         2.24.0             pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        3.0.8              pyhd8ed1ab_0    conda-forge
jupytext                  1.15.0             pyhcff175f_0    conda-forge
jxrlib                    1.1                  h8ffe710_2    conda-forge
khronos-opencl-icd-loader 2023.04.17           h64bf75a_0    conda-forge
kiwisolver                1.4.4            py39h1f6ef14_1    conda-forge
krb5                      1.20.1               heb0366b_0    conda-forge
lazy_loader               0.2                pyhd8ed1ab_0    conda-forge
lcms2                     2.14                 h90d422f_0    conda-forge
lerc                      4.0.0                h63175ca_0    conda-forge
libabseil                 20230125.3      cxx17_h63175ca_0    conda-forge
libaec                    1.0.6                h63175ca_1    conda-forge
libarrow                  12.0.1           h0578746_5_cpu    conda-forge
libavif                   0.11.1               ha7b97ba_2    conda-forge
libblas                   3.9.0              17_win64_mkl    conda-forge
libbrotlicommon           1.0.9                hcfcfb64_9    conda-forge
libbrotlidec              1.0.9                hcfcfb64_9    conda-forge
libbrotlienc              1.0.9                hcfcfb64_9    conda-forge
libcblas                  3.9.0              17_win64_mkl    conda-forge
libclang                  15.0.7          default_h77d9078_3    conda-forge
libclang13                15.0.7          default_h77d9078_3    conda-forge
libcrc32c                 1.1.2                h0e60522_0    conda-forge
libcurl                   8.1.2                h68f0423_0    conda-forge
libdeflate                1.14                 hcfcfb64_0    conda-forge
libevent                  2.1.12               h3671451_1    conda-forge
libexpat                  2.5.0                h63175ca_1    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libglib                   2.76.4               he8f3873_0    conda-forge
libgoogle-cloud           2.12.0               hbc1b25b_1    conda-forge
libgrpc                   1.56.2               hea2d5f7_0    conda-forge
libhwloc                  2.9.1                h51c2c0f_0    conda-forge
libiconv                  1.17                 h8ffe710_0    conda-forge
libitk                    5.3.0                h6e1890f_0    conda-forge
libjpeg-turbo             2.1.4                hcfcfb64_0    conda-forge
liblapack                 3.9.0              17_win64_mkl    conda-forge
libogg                    1.3.4                h8ffe710_1    conda-forge
libopus                   1.3.1                h8ffe710_1    conda-forge
libpng                    1.6.39               h19919ed_0    conda-forge
libprotobuf               4.23.3               h1975477_0    conda-forge
libsodium                 1.0.18               h8d14728_1    conda-forge
libsqlite                 3.42.0               hcfcfb64_0    conda-forge
libssh2                   1.11.0               h7dfc565_0    conda-forge
libthrift                 0.18.1               h06f6336_2    conda-forge
libtiff                   4.4.0                hc4f729c_5    conda-forge
libutf8proc               2.8.0                h82a8f57_0    conda-forge
libvorbis                 1.3.7                h0e60522_0    conda-forge
libwebp-base              1.3.1                hcfcfb64_0    conda-forge
libxcb                    1.13              hcd874cb_1004    conda-forge
libxml2                   2.10.4               hc3477c8_0    conda-forge
libzlib                   1.2.13               hcfcfb64_5    conda-forge
libzopfli                 1.0.3                h0e60522_0    conda-forge
llvmlite                  0.40.1           py39hd28a505_0    conda-forge
locket                    1.0.0              pyhd8ed1ab_0    conda-forge
loguru                    0.7.0            py39hcbf5309_0    conda-forge
lz4                       4.3.2            py39hf617134_0    conda-forge
lz4-c                     1.9.4                hcfcfb64_0    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
magicgui                  0.7.2              pyhd8ed1ab_0    conda-forge
mako                      1.2.4              pyhd8ed1ab_0    conda-forge
markdown-it-py            3.0.0              pyhd8ed1ab_0    conda-forge
markupsafe                2.1.3            py39ha55989b_0    conda-forge
matplotlib                3.7.2            py39hcbf5309_0    conda-forge
matplotlib-base           3.7.2            py39ha3e071c_0    conda-forge
matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
mdit-py-plugins           0.4.0              pyhd8ed1ab_0    conda-forge
mdurl                     0.1.0              pyhd8ed1ab_0    conda-forge
mistune                   3.0.0              pyhd8ed1ab_0    conda-forge
mkl                       2022.1.0           h6a75c08_874    conda-forge
msgpack-python            1.0.5            py39h1f6ef14_0    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
mypy_extensions           1.0.0              pyha770c72_0    conda-forge
napari                    0.4.18             pyhd8ed1ab_2    conda-forge
napari-3d-ortho-viewer    0.0.1              pyhd8ed1ab_0    conda-forge
napari-accelerated-pixel-and-object-classification 0.12.3             pyhd8ed1ab_0    conda-forge
napari-animation          0.0.7              pyhd8ed1ab_0    conda-forge
napari-assistant          0.4.5              pyhd8ed1ab_0    conda-forge
napari-blob-detection     0.0.2              pyhd8ed1ab_0    conda-forge
napari-brightness-contrast 0.1.8              pyhd8ed1ab_0    conda-forge
napari-clusters-plotter   0.7.2                     dev_0    <develop>
napari-console            0.0.8              pyhd8ed1ab_0    conda-forge
napari-crop               0.1.9              pyhd8ed1ab_0    conda-forge
napari-curtain            0.1.1              pyhd8ed1ab_0    conda-forge
napari-czifile2           0.2.7              pyhd8ed1ab_0    conda-forge
napari-folder-browser     0.1.3              pyhd8ed1ab_0    conda-forge
napari-layer-details-display 0.1.5              pyhd8ed1ab_0    conda-forge
napari-mouse-controls     0.1.3              pyhd8ed1ab_0    conda-forge
napari-plot-profile       0.2.2              pyhd8ed1ab_0    conda-forge
napari-plugin-engine      0.2.0              pyhd8ed1ab_2    conda-forge
napari-plugin-search      0.1.3              pyhd8ed1ab_0    conda-forge
napari-pyclesperanto-assistant 0.22.1             pyhd8ed1ab_0    conda-forge
napari-pystackreg         0.1.4              pyhd8ed1ab_0    conda-forge
napari-roi                0.1.8              pyhd8ed1ab_0    conda-forge
napari-segment-blobs-and-things-with-membranes 0.3.6              pyhd8ed1ab_0    conda-forge
napari-simpleitk-image-processing 0.4.5              pyhd8ed1ab_0    conda-forge
napari-skimage-regionprops 0.10.1             pyhd8ed1ab_0    conda-forge
napari-svg                0.1.10             pyhd8ed1ab_0    conda-forge
napari-tabu               0.1.5              pyhd8ed1ab_0    conda-forge
napari-time-slicer        0.4.9              pyhd8ed1ab_1    conda-forge
napari-tools-menu         0.1.19             pyhd8ed1ab_0    conda-forge
napari-workflow-inspector 0.2.2              pyhd8ed1ab_0    conda-forge
napari-workflow-optimizer 0.1.4              pyhd8ed1ab_0    conda-forge
napari-workflows          0.2.9              pyhd8ed1ab_0    conda-forge
nbclassic                 1.0.0              pyhb4ecaf3_1    conda-forge
nbclient                  0.8.0              pyhd8ed1ab_0    conda-forge
nbconvert                 7.7.3              pyhd8ed1ab_0    conda-forge
nbconvert-core            7.7.3              pyhd8ed1ab_0    conda-forge
nbconvert-pandoc          7.7.3              pyhd8ed1ab_0    conda-forge
nbformat                  5.9.2              pyhd8ed1ab_0    conda-forge
nest-asyncio              1.5.6              pyhd8ed1ab_0    conda-forge
networkx                  3.1                pyhd8ed1ab_0    conda-forge
notebook                  6.5.4              pyha770c72_0    conda-forge
notebook-shim             0.2.3              pyhd8ed1ab_0    conda-forge
npe2                      0.6.2              pyhd8ed1ab_0    conda-forge
numba                     0.57.1           py39hadaa1c4_0    conda-forge
numcodecs                 0.11.0           py39h99910a6_1    conda-forge
numpy                     1.23.5           py39hbccbffa_0    conda-forge
numpydoc                  1.5.0              pyhd8ed1ab_0    conda-forge
openh264                  2.3.1                h63175ca_2    conda-forge
openjpeg                  2.5.0                hc9384bd_1    conda-forge
openssl                   3.1.2                hcfcfb64_0    conda-forge
orc                       1.9.0                hf2b8f0d_1    conda-forge
packaging                 23.1               pyhd8ed1ab_0    conda-forge
pandas                    2.0.3            py39h1679cfb_1    conda-forge
pandoc                    3.1.3                h57928b3_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
partd                     1.4.0              pyhd8ed1ab_0    conda-forge
patsy                     0.5.3              pyhd8ed1ab_0    conda-forge
pcre2                     10.40                h17e33f8_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    9.2.0            py39h595c93f_3    conda-forge
pint                      0.22               pyhd8ed1ab_1    conda-forge
pip                       23.2.1             pyhd8ed1ab_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_0    conda-forge
platformdirs              3.10.0             pyhd8ed1ab_0    conda-forge
platymatch                0.0.3              pyhd8ed1ab_0    conda-forge
pluggy                    1.2.0              pyhd8ed1ab_0    conda-forge
ply                       3.11                       py_1    conda-forge
pooch                     1.7.0              pyha770c72_3    conda-forge
prometheus_client         0.17.1             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.39             pyha770c72_0    conda-forge
prompt_toolkit            3.0.39               hd8ed1ab_0    conda-forge
psutil                    5.9.5            py39ha55989b_0    conda-forge
psygnal                   0.9.1              pyhd8ed1ab_0    conda-forge
pthread-stubs             0.4               hcd874cb_1001    conda-forge
pthreads-win32            2.9.1                hfa6e2cd_3    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pyarrow                   12.0.1          py39hca4e8af_5_cpu    conda-forge
pyclesperanto-prototype   0.24.1             pyhd8ed1ab_0    conda-forge
pycodestyle               2.11.0             pyhd8ed1ab_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pydantic                  1.10.12          py39ha55989b_1    conda-forge
pygments                  2.15.1             pyhd8ed1ab_0    conda-forge
pynndescent               0.5.10             pyh1a96a4e_0    conda-forge
pyopencl                  2023.1.1         py39h2ca6765_0    conda-forge
pyopengl                  3.1.6              pyhd8ed1ab_1    conda-forge
pyparsing                 3.0.9              pyhd8ed1ab_0    conda-forge
pyperclip                 1.8.2              pyhd8ed1ab_2    conda-forge
pyproject_hooks           1.0.0              pyhd8ed1ab_0    conda-forge
pyqt                      5.15.9           py39hb77abff_4    conda-forge
pyqt5-sip                 12.12.2          py39h99910a6_4    conda-forge
pyqtgraph                 0.13.3             pyhd8ed1ab_0    conda-forge
pyrsistent                0.19.3           py39ha55989b_0    conda-forge
pysocks                   1.7.1              pyh0701188_6    conda-forge
pystackreg                0.2.7            py39h2ba5b7c_1    conda-forge
pytest                    7.4.0              pyhd8ed1ab_0    conda-forge
pytest-qt                 4.2.0                    pypi_0    pypi
python                    3.9.16          h4de0772_0_cpython    conda-forge
python-build              0.10.0             pyhd8ed1ab_1    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.18.0             pyhd8ed1ab_0    conda-forge
python-json-logger        2.0.7              pyhd8ed1ab_0    conda-forge
python-tzdata             2023.3             pyhd8ed1ab_0    conda-forge
python_abi                3.9                      3_cp39    conda-forge
pytomlpp                  1.0.13           py39h1f6ef14_0    conda-forge
pytools                   2023.1.1           pyhd8ed1ab_0    conda-forge
pytz                      2023.3             pyhd8ed1ab_0    conda-forge
pywavelets                1.4.1            py39hc266a54_0    conda-forge
pywin32                   304              py39h99910a6_2    conda-forge
pywinpty                  2.0.11           py39h99910a6_0    conda-forge
pyyaml                    6.0              py39ha55989b_5    conda-forge
pyzmq                     25.1.0           py39hea35a22_0    conda-forge
qt-main                   5.15.8               h720456b_6    conda-forge
qtconsole                 5.4.3              pyhd8ed1ab_0    conda-forge
qtconsole-base            5.4.3              pyha770c72_0    conda-forge
qtpy                      2.3.1              pyhd8ed1ab_0    conda-forge
re2                       2023.03.02           hd4eee63_0    conda-forge
redlionfish               0.9              py39hcbf5309_2    conda-forge
referencing               0.30.0             pyhd8ed1ab_0    conda-forge
reikna                    0.8.0              pyhd8ed1ab_0    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
rfc3339-validator         0.1.4              pyhd8ed1ab_0    conda-forge
rfc3986-validator         0.1.1              pyh9f0ad1d_0    conda-forge
rich                      13.5.1             pyhd8ed1ab_0    conda-forge
rpds-py                   0.9.2            py39hf21820d_0    conda-forge
scikit-image              0.21.0           py39h99910a6_0    conda-forge
scikit-learn              1.3.0            py39hfa9d973_0    conda-forge
scipy                     1.11.1           py39hde5eda1_0    conda-forge
seaborn                   0.12.2               hd8ed1ab_0    conda-forge
seaborn-base              0.12.2             pyhd8ed1ab_0    conda-forge
send2trash                1.8.2              pyh08f2357_0    conda-forge
setuptools                68.0.0             pyhd8ed1ab_0    conda-forge
shellingham               1.5.1              pyhd8ed1ab_0    conda-forge
simpleitk                 2.2.1            py39h138a4a7_1    conda-forge
sip                       6.7.11           py39h99910a6_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.1.10               hfb803bf_0    conda-forge
sniffio                   1.3.0              pyhd8ed1ab_0    conda-forge
snowballstemmer           2.2.0              pyhd8ed1ab_0    conda-forge
sortedcontainers          2.4.0              pyhd8ed1ab_0    conda-forge
soupsieve                 2.3.2.post1        pyhd8ed1ab_0    conda-forge
sphinx                    4.5.0              pyh6c4a22f_0    conda-forge
sphinxcontrib-applehelp   1.0.4              pyhd8ed1ab_0    conda-forge
sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
sphinxcontrib-htmlhelp    2.0.1              pyhd8ed1ab_0    conda-forge
sphinxcontrib-jsmath      1.0.1                      py_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
sphinxcontrib-serializinghtml 1.1.5              pyhd8ed1ab_2    conda-forge
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
stackview                 0.6.3              pyhd8ed1ab_0    conda-forge
statsmodels               0.14.0           py39hbaa61f9_1    conda-forge
superqt                   0.4.1              pyhd8ed1ab_0    conda-forge
svt-av1                   1.4.1                h63175ca_0    conda-forge
tbb                       2021.9.0             h91493d7_0    conda-forge
tblib                     1.7.0              pyhd8ed1ab_0    conda-forge
terminado                 0.17.0             pyh08f2357_0    conda-forge
the-segmentation-game     0.2.0              pyhd8ed1ab_0    conda-forge
threadpoolctl             3.2.0              pyha21a80b_0    conda-forge
tifffile                  2022.10.10         pyhd8ed1ab_0    conda-forge
tinycss2                  1.2.1              pyhd8ed1ab_0    conda-forge
tk                        8.6.12               h8ffe710_0    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tomli-w                   1.0.0              pyhd8ed1ab_0    conda-forge
toolz                     0.12.0             pyhd8ed1ab_0    conda-forge
tornado                   6.3.2            py39ha55989b_0    conda-forge
tqdm                      4.65.0             pyhd8ed1ab_1    conda-forge
traitlets                 5.9.0              pyhd8ed1ab_0    conda-forge
transforms3d              0.4.1              pyhd8ed1ab_0    conda-forge
typer                     0.9.0              pyhd8ed1ab_0    conda-forge
typing-extensions         4.7.1                hd8ed1ab_0    conda-forge
typing_extensions         4.7.1              pyha770c72_0    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
umap-learn                0.5.3            py39hcbf5309_1    conda-forge
unicodedata2              15.0.0           py39ha55989b_0    conda-forge
uri-template              1.3.0              pyhd8ed1ab_0    conda-forge
urllib3                   2.0.4              pyhd8ed1ab_0    conda-forge
vc                        14.3                h64f974e_17    conda-forge
vc14_runtime              14.36.32532         hfdfe4a8_17    conda-forge
vispy                     0.12.2           py39hc266a54_0    conda-forge
vs2015_runtime            14.36.32532         h05e6639_17    conda-forge
wcwidth                   0.2.6              pyhd8ed1ab_0    conda-forge
webcolors                 1.13               pyhd8ed1ab_0    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          1.6.1              pyhd8ed1ab_0    conda-forge
wheel                     0.41.0             pyhd8ed1ab_0    conda-forge
widgetsnbextension        4.0.8              pyhd8ed1ab_0    conda-forge
win32_setctime            1.1.0              pyhd8ed1ab_0    conda-forge
win_inet_pton             1.1.0              pyhd8ed1ab_6    conda-forge
winpty                    0.4.3                         4    conda-forge
wrapt                     1.15.0           py39ha55989b_0    conda-forge
x264                      1!164.3095           h8ffe710_2    conda-forge
x265                      3.5                  h2d74725_3    conda-forge
xorg-libxau               1.0.11               hcd874cb_0    conda-forge
xorg-libxdmcp             1.1.3                hcd874cb_0    conda-forge
xyzservices               2023.7.0           pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
y-py                      0.5.9            py39hf21820d_0    conda-forge
yaml                      0.2.5                h8ffe710_2    conda-forge
ypy-websocket             0.8.2              pyhd8ed1ab_0    conda-forge
zarr                      2.16.0             pyhd8ed1ab_0    conda-forge
zeromq                    4.3.4                h0e60522_1    conda-forge
zfp                       1.0.0                h63175ca_3    conda-forge
zict                      3.0.0              pyhd8ed1ab_0    conda-forge
zipp                      3.16.2             pyhd8ed1ab_0    conda-forge
zlib-ng                   2.0.7                hcfcfb64_0    conda-forge
zstd                      1.5.2                h12be248_7    conda-forge
my pytest local results with napari 0.4.18
================================================= test session starts =================================================
platform win32 -- Python 3.9.16, pytest-7.4.0, pluggy-1.2.0
PyQt5 5.15.9 -- Qt runtime 5.15.8 -- Qt compiled 5.15.8
rootdir: C:\Users\mazo260d\Documents\GitHub\napari-clusters-plotter
plugins: anyio-3.7.1, napari-0.4.18, napari-plugin-engine-0.2.0, npe2-0.6.2, qt-4.2.0
collected 23 items

napari_clusters_plotter\_tests\test_clustering.py .KMEANS predictions finished.
.F...                                                         [ 26%]
napari_clusters_plotter\_tests\test_dimension_reduction.py .E.E.....                                             [ 56%]
napari_clusters_plotter\_tests\test_dock_widget.py ...                                                           [ 69%]
napari_clusters_plotter\_tests\test_plotter.py ....                                                              [ 86%]
napari_clusters_plotter\_tests\test_utils.py ...                                                                 [100%]

======================================================= ERRORS ========================================================
_____________________________________ ERROR at teardown of test_clustering_widget _____________________________________

qtbot = <pytestqt.qtbot.QtBot object at 0x000001C651DE9310>
request = <SubRequest 'make_napari_viewer' for <Function test_clustering_widget>>
napari_plugin_manager = <napari.plugins._plugin_manager.NapariPluginManager object at 0x000001C651DE9BB0>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x000001C651DE91C0>, clean_themes = None

    @pytest.fixture
    def make_napari_viewer(
        qtbot,
        request: 'FixtureRequest',
        napari_plugin_manager,
        monkeypatch,
        clean_themes,
    ):
        """A fixture function that creates a napari viewer for use in testing.

        Use this fixture as a function in your tests:

            viewer = make_napari_viewer()

        It accepts all the same arguments as napari.Viewer, plus the following
        test-related paramaters:

        ViewerClass : Type[napari.Viewer], optional
            Override the viewer class being used.  By default, will
            use napari.viewer.Viewer
        strict_qt : bool or str, optional
            If True, a check will be performed after test cleanup to make sure that
            no top level widgets were created and *not* cleaned up during the
            test.  If the string "raise" is provided, an AssertionError will be
            raised.  Otherwise a warning is emitted.
            By default, this is False unless the test is being performed within
            the napari package.
            This can be made globally true by setting the 'NAPARI_STRICT_QT'
            environment variable.
        block_plugin_discovery : bool, optional
            Block discovery of non-builtin plugins.  Note: plugins can still be
            manually registered by using the 'napari_plugin_manager' fixture and
            the `napari_plugin_manager.register()` method. By default, True.

        Examples
        --------
        >>> def test_adding_shapes(make_napari_viewer):
        ...     viewer = make_napari_viewer()
        ...     viewer.add_shapes()
        ...     assert len(viewer.layers) == 1

        >>> def test_something_with_plugins(make_napari_viewer):
        ...     viewer = make_napari_viewer(block_plugin_discovery=False)

        >>> def test_something_with_strict_qt_tests(make_napari_viewer):
        ...     viewer = make_napari_viewer(strict_qt=True)
        """
        from qtpy.QtWidgets import QApplication

        from napari import Viewer
        from napari._qt.qt_viewer import QtViewer
        from napari.settings import get_settings

        global GCPASS
        GCPASS += 1

        if GCPASS % 50 == 0:
            gc.collect()
        else:
            gc.collect(1)

        _do_not_inline_below = len(QtViewer._instances)
        # # do not inline to avoid pytest trying to compute repr of expression.
        # # it fails if C++ object gone but not Python object.
        if request.config.getoption(_SAVE_GRAPH_OPNAME):
            fail_obj_graph(QtViewer)
        QtViewer._instances.clear()
        assert _do_not_inline_below == 0, (
            "Some instance of QtViewer is not properly cleaned in one of previous test. For easier debug one may "
            f"use {_SAVE_GRAPH_OPNAME} flag for pytest to get graph of leaked objects. If you use qtbot (from pytest-qt)"
            " to clean Qt objects after test you may need to switch to manual clean using "
            "`deleteLater()` and `qtbot.wait(50)` later."
        )

        settings = get_settings()
        settings.reset()

        viewers: WeakSet[Viewer] = WeakSet()

        # may be overridden by using `make_napari_viewer(strict=True)`
        _strict = False

        initial = QApplication.topLevelWidgets()
        prior_exception = getattr(sys, 'last_value', None)
        is_internal_test = request.module.__name__.startswith("napari.")

        # disable throttling cursor event in tests
        monkeypatch.setattr(
            "napari._qt.qt_main_window._QtMainWindow._throttle_cursor_to_status_connection",
            _empty,
        )

        def actual_factory(
            *model_args,
            ViewerClass=Viewer,
            strict_qt=None,
            block_plugin_discovery=True,
            **model_kwargs,
        ):
            if strict_qt is None:
                strict_qt = is_internal_test or os.getenv("NAPARI_STRICT_QT")
            nonlocal _strict
            _strict = strict_qt

            if not block_plugin_discovery:
                napari_plugin_manager.discovery_blocker.stop()

            should_show = request.config.getoption("--show-napari-viewer")
            model_kwargs['show'] = model_kwargs.pop('show', should_show)
            viewer = ViewerClass(*model_args, **model_kwargs)
            viewers.add(viewer)

            return viewer

        yield actual_factory

        # Some tests might have the viewer closed, so this call will not be able
        # to access the window.
        with suppress(AttributeError):
            get_settings().reset()

        # close viewers, but don't saving window settings while closing
        for viewer in viewers:
            if hasattr(viewer.window, '_qt_window'):
                with patch.object(
                    viewer.window._qt_window, '_save_current_window_settings'
                ):
                    viewer.close()
            else:
                viewer.close()

        if GCPASS % 50 == 0 or len(QtViewer._instances):
            gc.collect()
        else:
            gc.collect(1)

        if request.config.getoption(_SAVE_GRAPH_OPNAME):
            fail_obj_graph(QtViewer)

        if request.node.rep_call.failed:
            # IF test failed do not check for leaks
            QtViewer._instances.clear()

        _do_not_inline_below = len(QtViewer._instances)

        QtViewer._instances.clear()  # clear to prevent fail of next test

        # do not inline to avoid pytest trying to compute repr of expression.
        # it fails if C++ object gone but not Python object.
        assert _do_not_inline_below == 0

        # only check for leaked widgets if an exception was raised during the test,
        # or "strict" mode was used.
        if _strict and getattr(sys, 'last_value', None) is prior_exception:
            QApplication.processEvents()
            leak = set(QApplication.topLevelWidgets()).difference(initial)
            # still not sure how to clean up some of the remaining vispy
            # vispy.app.backends._qt.CanvasBackendDesktop widgets...
            if any(n.__class__.__name__ != 'CanvasBackendDesktop' for n in leak):
                # just a warning... but this can be converted to test errors
                # in pytest with `-W error`
                msg = f"""The following Widgets leaked!: {leak}.

                Note: If other tests are failing it is likely that widgets will leak
                as they will be (indirectly) attached to the tracebacks of previous failures.
                Please only consider this an error if all other tests are passing.
                """
                # Explanation notes on the above: While we are indeed looking at the
                # difference in sets of widgets between before and after, new object can
                # still not be garbage collected because of it.
                # in particular with VisPyCanvas, it looks like if a traceback keeps
                # contains the type, then instances are still attached to the type.
                # I'm not too sure why this is the case though.
                if _strict:
>                   raise AssertionError(msg)
E                   AssertionError: The following Widgets leaked!: {<napari_clusters_plotter._clustering.ClusteringWidget object at 0x000001C64E60B820>, <PyQt5.QtWidgets.QFrame object at 0x000001C65061A550>, <PyQt5.QtWidgets.QFrame object at 0x000001C65061A790>}.
E
E                               Note: If other tests are failing it is likely that widgets will leak
E                               as they will be (indirectly) attached to the tracebacks of previous failures.
E                               Please only consider this an error if all other tests are passing.

..\..\..\mambaforge\envs\napari-clusters-plotter-dev-18\lib\site-packages\napari\utils\_testsupport.py:303: AssertionError
_____________________________________ ERROR at teardown of test_bad_measurements ______________________________________

qtbot = <pytestqt.qtbot.QtBot object at 0x000001C64F908D90>
request = <SubRequest 'make_napari_viewer' for <Function test_bad_measurements>>
napari_plugin_manager = <napari.plugins._plugin_manager.NapariPluginManager object at 0x000001C64F908460>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x000001C64F908850>, clean_themes = None

    @pytest.fixture
    def make_napari_viewer(
        qtbot,
        request: 'FixtureRequest',
        napari_plugin_manager,
        monkeypatch,
        clean_themes,
    ):
        """A fixture function that creates a napari viewer for use in testing.

        Use this fixture as a function in your tests:

            viewer = make_napari_viewer()

        It accepts all the same arguments as napari.Viewer, plus the following
        test-related paramaters:

        ViewerClass : Type[napari.Viewer], optional
            Override the viewer class being used.  By default, will
            use napari.viewer.Viewer
        strict_qt : bool or str, optional
            If True, a check will be performed after test cleanup to make sure that
            no top level widgets were created and *not* cleaned up during the
            test.  If the string "raise" is provided, an AssertionError will be
            raised.  Otherwise a warning is emitted.
            By default, this is False unless the test is being performed within
            the napari package.
            This can be made globally true by setting the 'NAPARI_STRICT_QT'
            environment variable.
        block_plugin_discovery : bool, optional
            Block discovery of non-builtin plugins.  Note: plugins can still be
            manually registered by using the 'napari_plugin_manager' fixture and
            the `napari_plugin_manager.register()` method. By default, True.

        Examples
        --------
        >>> def test_adding_shapes(make_napari_viewer):
        ...     viewer = make_napari_viewer()
        ...     viewer.add_shapes()
        ...     assert len(viewer.layers) == 1

        >>> def test_something_with_plugins(make_napari_viewer):
        ...     viewer = make_napari_viewer(block_plugin_discovery=False)

        >>> def test_something_with_strict_qt_tests(make_napari_viewer):
        ...     viewer = make_napari_viewer(strict_qt=True)
        """
        from qtpy.QtWidgets import QApplication

        from napari import Viewer
        from napari._qt.qt_viewer import QtViewer
        from napari.settings import get_settings

        global GCPASS
        GCPASS += 1

        if GCPASS % 50 == 0:
            gc.collect()
        else:
            gc.collect(1)

        _do_not_inline_below = len(QtViewer._instances)
        # # do not inline to avoid pytest trying to compute repr of expression.
        # # it fails if C++ object gone but not Python object.
        if request.config.getoption(_SAVE_GRAPH_OPNAME):
            fail_obj_graph(QtViewer)
        QtViewer._instances.clear()
        assert _do_not_inline_below == 0, (
            "Some instance of QtViewer is not properly cleaned in one of previous test. For easier debug one may "
            f"use {_SAVE_GRAPH_OPNAME} flag for pytest to get graph of leaked objects. If you use qtbot (from pytest-qt)"
            " to clean Qt objects after test you may need to switch to manual clean using "
            "`deleteLater()` and `qtbot.wait(50)` later."
        )

        settings = get_settings()
        settings.reset()

        viewers: WeakSet[Viewer] = WeakSet()

        # may be overridden by using `make_napari_viewer(strict=True)`
        _strict = False

        initial = QApplication.topLevelWidgets()
        prior_exception = getattr(sys, 'last_value', None)
        is_internal_test = request.module.__name__.startswith("napari.")

        # disable throttling cursor event in tests
        monkeypatch.setattr(
            "napari._qt.qt_main_window._QtMainWindow._throttle_cursor_to_status_connection",
            _empty,
        )

        def actual_factory(
            *model_args,
            ViewerClass=Viewer,
            strict_qt=None,
            block_plugin_discovery=True,
            **model_kwargs,
        ):
            if strict_qt is None:
                strict_qt = is_internal_test or os.getenv("NAPARI_STRICT_QT")
            nonlocal _strict
            _strict = strict_qt

            if not block_plugin_discovery:
                napari_plugin_manager.discovery_blocker.stop()

            should_show = request.config.getoption("--show-napari-viewer")
            model_kwargs['show'] = model_kwargs.pop('show', should_show)
            viewer = ViewerClass(*model_args, **model_kwargs)
            viewers.add(viewer)

            return viewer

        yield actual_factory

        # Some tests might have the viewer closed, so this call will not be able
        # to access the window.
        with suppress(AttributeError):
            get_settings().reset()

        # close viewers, but don't saving window settings while closing
        for viewer in viewers:
            if hasattr(viewer.window, '_qt_window'):
                with patch.object(
                    viewer.window._qt_window, '_save_current_window_settings'
                ):
                    viewer.close()
            else:
                viewer.close()

        if GCPASS % 50 == 0 or len(QtViewer._instances):
            gc.collect()
        else:
            gc.collect(1)

        if request.config.getoption(_SAVE_GRAPH_OPNAME):
            fail_obj_graph(QtViewer)

        if request.node.rep_call.failed:
            # IF test failed do not check for leaks
            QtViewer._instances.clear()

        _do_not_inline_below = len(QtViewer._instances)

        QtViewer._instances.clear()  # clear to prevent fail of next test

        # do not inline to avoid pytest trying to compute repr of expression.
        # it fails if C++ object gone but not Python object.
        assert _do_not_inline_below == 0

        # only check for leaked widgets if an exception was raised during the test,
        # or "strict" mode was used.
        if _strict and getattr(sys, 'last_value', None) is prior_exception:
            QApplication.processEvents()
            leak = set(QApplication.topLevelWidgets()).difference(initial)
            # still not sure how to clean up some of the remaining vispy
            # vispy.app.backends._qt.CanvasBackendDesktop widgets...
            if any(n.__class__.__name__ != 'CanvasBackendDesktop' for n in leak):
                # just a warning... but this can be converted to test errors
                # in pytest with `-W error`
                msg = f"""The following Widgets leaked!: {leak}.

                Note: If other tests are failing it is likely that widgets will leak
                as they will be (indirectly) attached to the tracebacks of previous failures.
                Please only consider this an error if all other tests are passing.
                """
                # Explanation notes on the above: While we are indeed looking at the
                # difference in sets of widgets between before and after, new object can
                # still not be garbage collected because of it.
                # in particular with VisPyCanvas, it looks like if a traceback keeps
                # contains the type, then instances are still attached to the type.
                # I'm not too sure why this is the case though.
                if _strict:
>                   raise AssertionError(msg)
E                   AssertionError: The following Widgets leaked!: {<PyQt5.QtWidgets.QFrame object at 0x000001C64E5F74C0>, <PyQt5.QtWidgets.QFrame object at 0x000001C64F778700>, <napari_clusters_plotter._dimensionality_reduction.DimensionalityReductionWidget object at 0x000001C650618940>}.
E
E                               Note: If other tests are failing it is likely that widgets will leak
E                               as they will be (indirectly) attached to the tracebacks of previous failures.
E                               Please only consider this an error if all other tests are passing.

..\..\..\mambaforge\envs\napari-clusters-plotter-dev-18\lib\site-packages\napari\utils\_testsupport.py:303: AssertionError
------------------------------------------------ Captured stdout call -------------------------------------------------
Selected labels layer: label
Selected measurements: ['label', 'area', 'perimeter']
UMAP(n_neighbors=2, random_state=133, verbose=True)
Fri Aug 11 08:24:22 2023 Construct fuzzy simplicial set
Fri Aug 11 08:24:22 2023 Finding Nearest Neighbors
Fri Aug 11 08:24:25 2023 Finished Nearest Neighbor Search
Fri Aug 11 08:24:27 2023 Construct embedding
Fri Aug 11 08:24:28 2023 Finished embedding
Napari status bar display of label properties disabled because https://github.com/napari/napari/issues/5417 and https://github.com/napari/napari/issues/4342
Dimensionality reduction finished
------------------------------------------------ Captured stderr call -------------------------------------------------
Dimensionality reduction progress: 100%| ██████████ 500/500 [00:00]
====================================================== FAILURES =======================================================
_______________________________________________ test_hdbscan_clustering _______________________________________________

    def test_hdbscan_clustering():
        # create an example dataset
        n_samples = 100
        data = datasets.make_moons(n_samples=n_samples, random_state=1, noise=0.05)
        true_class = data[1]
        measurements = data[0]

        from napari_clusters_plotter._clustering import hdbscan_clustering

        min_cluster_size = 5
        min_samples = 2  # number of samples that should be included in one cluster

        # hdbscan_clustering returns (str, np.ndarray), where the first item is algorithm name
>       result = hdbscan_clustering(
            measurements,
            min_cluster_size=min_cluster_size,
            min_samples=min_samples,
        )

napari_clusters_plotter\_tests\test_clustering.py:129:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
napari_clusters_plotter\_utilities.py:159: in wrapper
    embedded = func(*new_args, **kwargs)
napari_clusters_plotter\_clustering.py:559: in hdbscan_clustering
    return "HDBSCAN", clustering_hdbscan.fit_predict(reg_props)
..\..\..\mambaforge\envs\napari-clusters-plotter-dev-18\lib\site-packages\hdbscan\hdbscan_.py:1243: in fit_predict
    self.fit(X)
..\..\..\mambaforge\envs\napari-clusters-plotter-dev-18\lib\site-packages\hdbscan\hdbscan_.py:1205: in fit
    ) = hdbscan(clean_data, **kwargs)
..\..\..\mambaforge\envs\napari-clusters-plotter-dev-18\lib\site-packages\hdbscan\hdbscan_.py:884: in hdbscan
    _tree_to_labels(
..\..\..\mambaforge\envs\napari-clusters-plotter-dev-18\lib\site-packages\hdbscan\hdbscan_.py:80: in _tree_to_labels
    labels, probabilities, stabilities = get_clusters(
hdbscan\\_hdbscan_tree.pyx:659: in hdbscan._hdbscan_tree.get_clusters
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   TypeError: 'numpy.float64' object cannot be interpreted as an integer

hdbscan\\_hdbscan_tree.pyx:733: TypeError
================================================== warnings summary ===================================================
..\..\..\mambaforge\envs\napari-clusters-plotter-dev-18\lib\site-packages\imageio_ffmpeg\_utils.py:6
  C:\Users\mazo260d\mambaforge\envs\napari-clusters-plotter-dev-18\lib\site-packages\imageio_ffmpeg\_utils.py:6: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    from pkg_resources import resource_filename

..\..\..\mambaforge\envs\napari-clusters-plotter-dev-18\lib\site-packages\pkg_resources\__init__.py:2871
  C:\Users\mazo260d\mambaforge\envs\napari-clusters-plotter-dev-18\lib\site-packages\pkg_resources\__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

..\..\..\mambaforge\envs\napari-clusters-plotter-dev-18\lib\site-packages\pkg_resources\__init__.py:2871
..\..\..\mambaforge\envs\napari-clusters-plotter-dev-18\lib\site-packages\pkg_resources\__init__.py:2871
..\..\..\mambaforge\envs\napari-clusters-plotter-dev-18\lib\site-packages\pkg_resources\__init__.py:2871
..\..\..\mambaforge\envs\napari-clusters-plotter-dev-18\lib\site-packages\pkg_resources\__init__.py:2871
  C:\Users\mazo260d\mambaforge\envs\napari-clusters-plotter-dev-18\lib\site-packages\pkg_resources\__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

napari_clusters_plotter/_tests/test_clustering.py::test_kmeans_clustering
napari_clusters_plotter/_tests/test_clustering.py::test_kmeans_clustering
  C:\Users\mazo260d\mambaforge\envs\napari-clusters-plotter-dev-18\lib\site-packages\sklearn\cluster\_kmeans.py:1412: FutureWarning: The default value of `n_init` will change from 10 to 'auto' in 1.4. Set the value of `n_init` explicitly to suppress the warning
    super()._check_params_vs_input(X, default_n_init=10)

napari_clusters_plotter/_tests/test_clustering.py::test_kmeans_clustering
napari_clusters_plotter/_tests/test_clustering.py::test_gaussian_mixture_model
napari_clusters_plotter/_tests/test_clustering.py::test_gaussian_mixture_model
  C:\Users\mazo260d\mambaforge\envs\napari-clusters-plotter-dev-18\lib\site-packages\sklearn\cluster\_kmeans.py:1436: UserWarning: KMeans is known to have a memory leak on Windows with MKL, when there are less chunks than available threads. You can avoid it by setting the environment variable OMP_NUM_THREADS=1.
    warnings.warn(

napari_clusters_plotter/_tests/test_clustering.py::test_agglomerative_clustering
napari_clusters_plotter/_tests/test_clustering.py::test_agglomerative_clustering
  C:\Users\mazo260d\mambaforge\envs\napari-clusters-plotter-dev-18\lib\site-packages\sklearn\cluster\_agglomerative.py:303: UserWarning: the number of connected components of the connectivity matrix is 3 > 1. Completing it to avoid stopping the tree early.
    connectivity, n_connected_components = _fix_connectivity(

napari_clusters_plotter/_tests/test_dimension_reduction.py::test_mds
  C:\Users\mazo260d\mambaforge\envs\napari-clusters-plotter-dev-18\lib\site-packages\sklearn\manifold\_mds.py:298: FutureWarning: The default value of `normalized_stress` will change to `'auto'` in version 1.4. To suppress this warning, manually set the value of `normalized_stress`.
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================================== short test summary info ===============================================
FAILED napari_clusters_plotter/_tests/test_clustering.py::test_hdbscan_clustering - TypeError: 'numpy.float64' object cannot be interpreted as an integer
ERROR napari_clusters_plotter/_tests/test_dimension_reduction.py::test_clustering_widget - AssertionError: The following Widgets leaked!: {<napari_clusters_plotter._clustering.ClusteringWidget object at 0x0...
ERROR napari_clusters_plotter/_tests/test_dimension_reduction.py::test_bad_measurements - AssertionError: The following Widgets leaked!: {<PyQt5.QtWidgets.QFrame object at 0x000001C64E5F74C0>, <PyQt5.QtWid...
================================ 1 failed, 22 passed, 14 warnings, 2 errors in 45.18s =================================
my environment with napari 0.4.17
# packages in environment at C:\Users\mazo260d\mambaforge\envs\napari-clusters-plotter-env-17:
#
# Name                    Version                   Build  Channel
aiofiles                  22.1.0             pyhd8ed1ab_0    conda-forge
aiosqlite                 0.19.0             pyhd8ed1ab_0    conda-forge
alabaster                 0.7.13             pyhd8ed1ab_0    conda-forge
anyio                     3.7.1              pyhd8ed1ab_0    conda-forge
aom                       3.5.0                h63175ca_0    conda-forge
apoc-backend              0.12.0             pyhd8ed1ab_0    conda-forge
app-model                 0.2.0              pyhd8ed1ab_0    conda-forge
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0          py310h8d17308_3    conda-forge
arrow                     1.2.3              pyhd8ed1ab_0    conda-forge
asciitree                 0.3.3                      py_2    conda-forge
asttokens                 2.2.1              pyhd8ed1ab_0    conda-forge
attrs                     23.1.0             pyh71513ae_1    conda-forge
autopep8                  2.0.2              pyhd8ed1ab_0    conda-forge
aws-c-auth                0.7.0                h6f3c987_2    conda-forge
aws-c-cal                 0.6.0                h6ba3258_0    conda-forge
aws-c-common              0.8.23               hcfcfb64_0    conda-forge
aws-c-compression         0.2.17               h420beca_1    conda-forge
aws-c-event-stream        0.3.1                had47b81_1    conda-forge
aws-c-http                0.7.11               h72ba615_0    conda-forge
aws-c-io                  0.13.28              ha35c040_0    conda-forge
aws-c-mqtt                0.8.14               h4941efa_2    conda-forge
aws-c-s3                  0.3.13               he04eaa7_2    conda-forge
aws-c-sdkutils            0.1.11               h420beca_1    conda-forge
aws-checksums             0.1.16               h420beca_1    conda-forge
aws-crt-cpp               0.20.3               h247a981_4    conda-forge
aws-sdk-cpp               1.10.57             h1a0519f_17    conda-forge
babel                     2.12.1             pyhd8ed1ab_1    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                pyhd8ed1ab_3    conda-forge
backports.functools_lru_cache 1.6.5              pyhd8ed1ab_0    conda-forge
beautifulsoup4            4.12.2             pyha770c72_0    conda-forge
bleach                    6.0.0              pyhd8ed1ab_0    conda-forge
blosc                     1.21.4               hdccc3a2_0    conda-forge
bokeh                     3.2.1              pyhd8ed1ab_0    conda-forge
brotli                    1.0.9                hcfcfb64_9    conda-forge
brotli-bin                1.0.9                hcfcfb64_9    conda-forge
brotli-python             1.0.9           py310h00ffb61_9    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
c-ares                    1.19.1               hcfcfb64_0    conda-forge
c-blosc2                  2.10.0               h183a6f4_0    conda-forge
ca-certificates           2023.7.22            h56e8100_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
cachey                    0.2.1              pyh9f0ad1d_0    conda-forge
certifi                   2023.7.22          pyhd8ed1ab_0    conda-forge
cffi                      1.15.1          py310h628cb3f_3    conda-forge
cfitsio                   4.2.0                h9ebe7e4_0    conda-forge
charls                    2.3.4                h39d44d4_0    conda-forge
charset-normalizer        3.2.0              pyhd8ed1ab_0    conda-forge
click                     8.1.6           win_pyh7428d3b_0    conda-forge
cloudpickle               2.2.1              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
comm                      0.1.4              pyhd8ed1ab_0    conda-forge
contourpy                 1.1.0           py310h232114e_0    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
cython                    0.29.36                  pypi_0    pypi
cytoolz                   0.12.2          py310h8d17308_0    conda-forge
czifile                   2019.7.2           pyh9f0ad1d_0    conda-forge
dask                      2023.8.0           pyhd8ed1ab_0    conda-forge
dask-core                 2023.8.0           pyhd8ed1ab_0    conda-forge
dav1d                     1.2.0                hcfcfb64_0    conda-forge
debugpy                   1.6.8           py310h00ffb61_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
deprecated                1.2.14             pyh1a96a4e_0    conda-forge
devbio-napari             0.10.1           win_h08f2357_0    conda-forge
distributed               2023.8.0           pyhd8ed1ab_0    conda-forge
docstring_parser          0.15               pyhd8ed1ab_0    conda-forge
docutils                  0.17.1          py310h5588dad_3    conda-forge
eigen                     3.4.0                h91493d7_0    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
exceptiongroup            1.1.2              pyhd8ed1ab_0    conda-forge
executing                 1.2.0              pyhd8ed1ab_0    conda-forge
expat                     2.5.0                h63175ca_1    conda-forge
fasteners                 0.17.3             pyhd8ed1ab_0    conda-forge
ffmpeg                    6.0.0           gpl_h3a5b8a7_100    conda-forge
fftw                      3.3.10          nompi_h38027f0_108    conda-forge
flit-core                 3.9.0              pyhd8ed1ab_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.14.2               hbde0cde_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.42.0          py310h8d17308_0    conda-forge
fqdn                      1.5.1              pyhd8ed1ab_0    conda-forge
freetype                  2.12.1               h546665d_1    conda-forge
freetype-py               2.4.0              pyhd8ed1ab_0    conda-forge
fsspec                    2023.6.0           pyh1a96a4e_0    conda-forge
funcsigs                  1.0.2                      py_3    conda-forge
gettext                   0.21.1               h5728263_0    conda-forge
giflib                    5.2.1                h64bf75a_3    conda-forge
glib                      2.76.4               h12be248_0    conda-forge
glib-tools                2.76.4               h12be248_0    conda-forge
gst-plugins-base          1.22.5               h001b923_0    conda-forge
gstreamer                 1.22.5               hb4038d2_0    conda-forge
hdbscan                   0.8.33          py310h9b08ddd_1    conda-forge
hdf5                      1.12.2          nompi_h57737ce_101    conda-forge
heapdict                  1.0.1                      py_0    conda-forge
hsluv                     5.0.2              pyh44b312d_0    conda-forge
icu                       70.1                 h0e60522_0    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
imagecodecs               2022.9.26       py310h99cb1c7_4    conda-forge
imagecodecs-lite          2019.12.3       py310h9b08ddd_6    conda-forge
imageio                   2.31.1             pyh24c5eb1_0    conda-forge
imageio-ffmpeg            0.4.8              pyhd8ed1ab_0    conda-forge
imagesize                 1.4.1              pyhd8ed1ab_0    conda-forge
importlib-metadata        6.8.0              pyha770c72_0    conda-forge
importlib_metadata        6.8.0                hd8ed1ab_0    conda-forge
importlib_resources       6.0.1              pyhd8ed1ab_0    conda-forge
in-n-out                  0.1.8              pyhd8ed1ab_0    conda-forge
iniconfig                 2.0.0              pyhd8ed1ab_0    conda-forge
intel-openmp              2023.2.0         h57928b3_49496    conda-forge
ipycanvas                 0.13.1             pyhd8ed1ab_0    conda-forge
ipyevents                 2.0.1              pyhd8ed1ab_0    conda-forge
ipykernel                 6.25.1             pyh6817e22_0    conda-forge
ipython                   8.14.0             pyh08f2357_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                8.1.0              pyhd8ed1ab_0    conda-forge
isoduration               20.11.0            pyhd8ed1ab_0    conda-forge
jedi                      0.19.0             pyhd8ed1ab_0    conda-forge
jinja2                    3.1.2              pyhd8ed1ab_1    conda-forge
joblib                    1.3.2              pyhd8ed1ab_0    conda-forge
jpeg                      9e                   hcfcfb64_3    conda-forge
json5                     0.9.14             pyhd8ed1ab_0    conda-forge
jsonpointer               2.0                        py_0    conda-forge
jsonschema                4.19.0             pyhd8ed1ab_0    conda-forge
jsonschema-specifications 2023.7.1           pyhd8ed1ab_0    conda-forge
jsonschema-with-format-nongpl 4.19.0             pyhd8ed1ab_0    conda-forge
jupyter                   1.0.0           py310h5588dad_8    conda-forge
jupyter_client            7.4.9              pyhd8ed1ab_0    conda-forge
jupyter_console           6.6.3              pyhd8ed1ab_0    conda-forge
jupyter_core              5.3.1           py310h5588dad_0    conda-forge
jupyter_events            0.7.0              pyhd8ed1ab_2    conda-forge
jupyter_server            1.23.6             pyhd8ed1ab_0    conda-forge
jupyter_server_fileid     0.9.0              pyhd8ed1ab_0    conda-forge
jupyter_server_ydoc       0.8.0              pyhd8ed1ab_0    conda-forge
jupyter_ydoc              0.2.4              pyhd8ed1ab_0    conda-forge
jupyterlab                3.6.5              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
jupyterlab_server         2.24.0             pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        3.0.8              pyhd8ed1ab_0    conda-forge
jupytext                  1.15.0             pyhcff175f_0    conda-forge
jxrlib                    1.1                  h8ffe710_2    conda-forge
khronos-opencl-icd-loader 2023.04.17           h64bf75a_0    conda-forge
kiwisolver                1.4.4           py310h232114e_1    conda-forge
krb5                      1.20.1               heb0366b_0    conda-forge
lazy_loader               0.2                pyhd8ed1ab_0    conda-forge
lcms2                     2.14                 h90d422f_0    conda-forge
lerc                      4.0.0                h63175ca_0    conda-forge
libabseil                 20230125.3      cxx17_h63175ca_0    conda-forge
libaec                    1.0.6                h63175ca_1    conda-forge
libarrow                  12.0.1           h0578746_5_cpu    conda-forge
libavif                   0.11.1               h5da7522_1    conda-forge
libblas                   3.9.0              17_win64_mkl    conda-forge
libbrotlicommon           1.0.9                hcfcfb64_9    conda-forge
libbrotlidec              1.0.9                hcfcfb64_9    conda-forge
libbrotlienc              1.0.9                hcfcfb64_9    conda-forge
libcblas                  3.9.0              17_win64_mkl    conda-forge
libclang                  15.0.7          default_h77d9078_3    conda-forge
libclang13                15.0.7          default_h77d9078_3    conda-forge
libcrc32c                 1.1.2                h0e60522_0    conda-forge
libcurl                   8.1.2                h68f0423_0    conda-forge
libdeflate                1.14                 hcfcfb64_0    conda-forge
libevent                  2.1.12               h3671451_1    conda-forge
libexpat                  2.5.0                h63175ca_1    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libglib                   2.76.4               he8f3873_0    conda-forge
libgoogle-cloud           2.12.0               hbc1b25b_1    conda-forge
libgrpc                   1.56.2               hea2d5f7_0    conda-forge
libhwloc                  2.9.1                h51c2c0f_0    conda-forge
libiconv                  1.17                 h8ffe710_0    conda-forge
libitk                    5.3.0                h6e1890f_0    conda-forge
liblapack                 3.9.0              17_win64_mkl    conda-forge
libogg                    1.3.4                h8ffe710_1    conda-forge
libopus                   1.3.1                h8ffe710_1    conda-forge
libpng                    1.6.39               h19919ed_0    conda-forge
libprotobuf               4.23.3               h1975477_0    conda-forge
libsodium                 1.0.18               h8d14728_1    conda-forge
libsqlite                 3.42.0               hcfcfb64_0    conda-forge
libssh2                   1.11.0               h7dfc565_0    conda-forge
libthrift                 0.18.1               h06f6336_2    conda-forge
libtiff                   4.4.0                hc4f729c_5    conda-forge
libutf8proc               2.8.0                h82a8f57_0    conda-forge
libvorbis                 1.3.7                h0e60522_0    conda-forge
libwebp-base              1.3.1                hcfcfb64_0    conda-forge
libxcb                    1.13              hcd874cb_1004    conda-forge
libxml2                   2.10.4               hc3477c8_0    conda-forge
libzlib                   1.2.13               hcfcfb64_5    conda-forge
libzopfli                 1.0.3                h0e60522_0    conda-forge
llvmlite                  0.40.1          py310hb84602e_0    conda-forge
locket                    1.0.0              pyhd8ed1ab_0    conda-forge
loguru                    0.7.0           py310h5588dad_0    conda-forge
lz4                       4.3.2           py310hbbb2075_0    conda-forge
lz4-c                     1.9.4                hcfcfb64_0    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
magicgui                  0.7.2              pyhd8ed1ab_0    conda-forge
mako                      1.2.4              pyhd8ed1ab_0    conda-forge
markdown-it-py            3.0.0              pyhd8ed1ab_0    conda-forge
markupsafe                2.1.3           py310h8d17308_0    conda-forge
matplotlib                3.7.2           py310h5588dad_0    conda-forge
matplotlib-base           3.7.2           py310h51140c5_0    conda-forge
matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
mdit-py-plugins           0.4.0              pyhd8ed1ab_0    conda-forge
mdurl                     0.1.0              pyhd8ed1ab_0    conda-forge
mistune                   3.0.0              pyhd8ed1ab_0    conda-forge
mkl                       2022.1.0           h6a75c08_874    conda-forge
msgpack-python            1.0.5           py310h232114e_0    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
mypy_extensions           1.0.0              pyha770c72_0    conda-forge
napari                    0.4.17          pyh275ddea_0_pyqt    conda-forge
napari-3d-ortho-viewer    0.0.1              pyhd8ed1ab_0    conda-forge
napari-accelerated-pixel-and-object-classification 0.12.3             pyhd8ed1ab_0    conda-forge
napari-animation          0.0.7              pyhd8ed1ab_0    conda-forge
napari-assistant          0.4.6              pyhd8ed1ab_0    conda-forge
napari-blob-detection     0.0.2              pyhd8ed1ab_0    conda-forge
napari-brightness-contrast 0.1.8              pyhd8ed1ab_0    conda-forge
napari-clusters-plotter   0.7.2                     dev_0    <develop>
napari-console            0.0.8              pyhd8ed1ab_0    conda-forge
napari-crop               0.1.9              pyhd8ed1ab_0    conda-forge
napari-curtain            0.1.1              pyhd8ed1ab_0    conda-forge
napari-czifile2           0.2.7              pyhd8ed1ab_0    conda-forge
napari-folder-browser     0.1.3              pyhd8ed1ab_0    conda-forge
napari-layer-details-display 0.1.5              pyhd8ed1ab_0    conda-forge
napari-mouse-controls     0.1.3              pyhd8ed1ab_0    conda-forge
napari-plot-profile       0.2.2              pyhd8ed1ab_0    conda-forge
napari-plugin-engine      0.2.0              pyhd8ed1ab_2    conda-forge
napari-plugin-search      0.1.3              pyhd8ed1ab_0    conda-forge
napari-pyclesperanto-assistant 0.22.1             pyhd8ed1ab_0    conda-forge
napari-pystackreg         0.1.4              pyhd8ed1ab_0    conda-forge
napari-roi                0.1.8              pyhd8ed1ab_0    conda-forge
napari-segment-blobs-and-things-with-membranes 0.3.6              pyhd8ed1ab_0    conda-forge
napari-simpleitk-image-processing 0.4.5              pyhd8ed1ab_0    conda-forge
napari-skimage-regionprops 0.10.1             pyhd8ed1ab_0    conda-forge
napari-svg                0.1.10             pyhd8ed1ab_0    conda-forge
napari-tabu               0.1.5              pyhd8ed1ab_0    conda-forge
napari-time-slicer        0.4.9              pyhd8ed1ab_1    conda-forge
napari-tools-menu         0.1.19             pyhd8ed1ab_0    conda-forge
napari-workflow-inspector 0.2.2              pyhd8ed1ab_0    conda-forge
napari-workflow-optimizer 0.1.4              pyhd8ed1ab_0    conda-forge
napari-workflows          0.2.9              pyhd8ed1ab_0    conda-forge
nbclassic                 1.0.0              pyhb4ecaf3_1    conda-forge
nbclient                  0.8.0              pyhd8ed1ab_0    conda-forge
nbconvert                 7.7.3              pyhd8ed1ab_0    conda-forge
nbconvert-core            7.7.3              pyhd8ed1ab_0    conda-forge
nbconvert-pandoc          7.7.3              pyhd8ed1ab_0    conda-forge
nbformat                  5.9.2              pyhd8ed1ab_0    conda-forge
nest-asyncio              1.5.6              pyhd8ed1ab_0    conda-forge
networkx                  3.1                pyhd8ed1ab_0    conda-forge
notebook                  6.5.5              pyha770c72_0    conda-forge
notebook-shim             0.2.3              pyhd8ed1ab_0    conda-forge
npe2                      0.6.2              pyhd8ed1ab_0    conda-forge
numba                     0.57.1          py310h19bcfe9_0    conda-forge
numcodecs                 0.11.0          py310h00ffb61_1    conda-forge
numpy                     1.23.5          py310h4a8f9c9_0    conda-forge
numpydoc                  1.5.0              pyhd8ed1ab_0    conda-forge
openh264                  2.3.1                h63175ca_2    conda-forge
openjpeg                  2.5.0                hc9384bd_1    conda-forge
openssl                   3.1.2                hcfcfb64_0    conda-forge
orc                       1.9.0                hf2b8f0d_1    conda-forge
packaging                 23.1               pyhd8ed1ab_0    conda-forge
pandas                    2.0.3           py310h1c4a608_1    conda-forge
pandoc                    3.1.3                h57928b3_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
partd                     1.4.0              pyhd8ed1ab_0    conda-forge
patsy                     0.5.3              pyhd8ed1ab_0    conda-forge
pcre2                     10.40                h17e33f8_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    9.2.0           py310hd4fb230_3    conda-forge
pint                      0.22               pyhd8ed1ab_1    conda-forge
pip                       23.2.1             pyhd8ed1ab_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_0    conda-forge
platformdirs              3.10.0             pyhd8ed1ab_0    conda-forge
platymatch                0.0.3              pyhd8ed1ab_0    conda-forge
pluggy                    1.2.0              pyhd8ed1ab_0    conda-forge
ply                       3.11                       py_1    conda-forge
pooch                     1.7.0              pyha770c72_3    conda-forge
prometheus_client         0.17.1             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.39             pyha770c72_0    conda-forge
prompt_toolkit            3.0.39               hd8ed1ab_0    conda-forge
psutil                    5.9.5           py310h8d17308_0    conda-forge
psygnal                   0.9.1              pyhd8ed1ab_0    conda-forge
pthread-stubs             0.4               hcd874cb_1001    conda-forge
pthreads-win32            2.9.1                hfa6e2cd_3    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pyarrow                   12.0.1          py310hd1a9178_5_cpu    conda-forge
pyclesperanto-prototype   0.24.1             pyhd8ed1ab_0    conda-forge
pycodestyle               2.11.0             pyhd8ed1ab_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pydantic                  1.10.12         py310h8d17308_1    conda-forge
pygments                  2.16.1             pyhd8ed1ab_0    conda-forge
pynndescent               0.5.10             pyh1a96a4e_0    conda-forge
pyopencl                  2023.1.1        py310hf19232d_0    conda-forge
pyopengl                  3.1.6              pyhd8ed1ab_1    conda-forge
pyparsing                 3.0.9              pyhd8ed1ab_0    conda-forge
pyperclip                 1.8.2              pyhd8ed1ab_2    conda-forge
pyproject_hooks           1.0.0              pyhd8ed1ab_0    conda-forge
pyqt                      5.15.9          py310h1fd54f2_4    conda-forge
pyqt5-sip                 12.12.2         py310h00ffb61_4    conda-forge
pyqtgraph                 0.13.3             pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyh0701188_6    conda-forge
pystackreg                0.2.7           py310h1c4a608_1    conda-forge
pytest                    7.4.0              pyhd8ed1ab_0    conda-forge
pytest-qt                 4.2.0              pyhd8ed1ab_0    conda-forge
python                    3.10.12         h4de0772_0_cpython    conda-forge
python-build              0.10.0             pyhd8ed1ab_1    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.18.0             pyhd8ed1ab_0    conda-forge
python-json-logger        2.0.7              pyhd8ed1ab_0    conda-forge
python-tzdata             2023.3             pyhd8ed1ab_0    conda-forge
python_abi                3.10                    3_cp310    conda-forge
pytomlpp                  1.0.13          py310h232114e_0    conda-forge
pytools                   2023.1.1           pyhd8ed1ab_0    conda-forge
pytz                      2023.3             pyhd8ed1ab_0    conda-forge
pywavelets                1.4.1           py310h9b08ddd_0    conda-forge
pywin32                   304             py310h00ffb61_2    conda-forge
pywinpty                  2.0.11          py310h00ffb61_0    conda-forge
pyyaml                    6.0             py310h8d17308_5    conda-forge
pyzmq                     24.0.1          py310hcd737a0_1    conda-forge
qt-main                   5.15.8               h720456b_6    conda-forge
qtconsole                 5.4.3              pyhd8ed1ab_0    conda-forge
qtconsole-base            5.4.3              pyha770c72_0    conda-forge
qtpy                      2.3.1              pyhd8ed1ab_0    conda-forge
re2                       2023.03.02           hd4eee63_0    conda-forge
redlionfish               0.9             py310h5588dad_2    conda-forge
referencing               0.30.2             pyhd8ed1ab_0    conda-forge
reikna                    0.8.0              pyhd8ed1ab_0    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
rfc3339-validator         0.1.4              pyhd8ed1ab_0    conda-forge
rfc3986-validator         0.1.1              pyh9f0ad1d_0    conda-forge
rich                      13.5.1             pyhd8ed1ab_0    conda-forge
rpds-py                   0.9.2           py310h87d50f1_0    conda-forge
scikit-image              0.21.0          py310h00ffb61_0    conda-forge
scikit-learn              1.3.0           py310hd266714_0    conda-forge
scipy                     1.11.1          py310h578b7cb_0    conda-forge
seaborn                   0.12.2               hd8ed1ab_0    conda-forge
seaborn-base              0.12.2             pyhd8ed1ab_0    conda-forge
send2trash                1.8.2              pyh08f2357_0    conda-forge
setuptools                68.0.0             pyhd8ed1ab_0    conda-forge
shellingham               1.5.1              pyhd8ed1ab_0    conda-forge
simpleitk                 2.2.1           py310hcf936e6_1    conda-forge
sip                       6.7.11          py310h00ffb61_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.1.10               hfb803bf_0    conda-forge
sniffio                   1.3.0              pyhd8ed1ab_0    conda-forge
snowballstemmer           2.2.0              pyhd8ed1ab_0    conda-forge
sortedcontainers          2.4.0              pyhd8ed1ab_0    conda-forge
soupsieve                 2.3.2.post1        pyhd8ed1ab_0    conda-forge
sphinx                    4.5.0              pyh6c4a22f_0    conda-forge
sphinxcontrib-applehelp   1.0.4              pyhd8ed1ab_0    conda-forge
sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
sphinxcontrib-htmlhelp    2.0.1              pyhd8ed1ab_0    conda-forge
sphinxcontrib-jsmath      1.0.1              pyhd8ed1ab_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
sphinxcontrib-serializinghtml 1.1.5              pyhd8ed1ab_2    conda-forge
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
stackview                 0.6.3              pyhd8ed1ab_0    conda-forge
statsmodels               0.14.0          py310h9b08ddd_1    conda-forge
superqt                   0.5.0              pyh9208f05_0    conda-forge
svt-av1                   1.5.0                h63175ca_0    conda-forge
tbb                       2021.9.0             h91493d7_0    conda-forge
tblib                     1.7.0              pyhd8ed1ab_0    conda-forge
terminado                 0.17.0             pyh08f2357_0    conda-forge
the-segmentation-game     0.2.0              pyhd8ed1ab_0    conda-forge
threadpoolctl             3.2.0              pyha21a80b_0    conda-forge
tifffile                  2022.10.10         pyhd8ed1ab_0    conda-forge
tinycss2                  1.2.1              pyhd8ed1ab_0    conda-forge
tk                        8.6.12               h8ffe710_0    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
toolz                     0.12.0             pyhd8ed1ab_0    conda-forge
tornado                   6.3.2           py310h8d17308_0    conda-forge
tqdm                      4.66.0             pyhd8ed1ab_0    conda-forge
traitlets                 5.9.0              pyhd8ed1ab_0    conda-forge
transforms3d              0.4.1              pyhd8ed1ab_0    conda-forge
typer                     0.9.0              pyhd8ed1ab_0    conda-forge
typing-extensions         4.7.1                hd8ed1ab_0    conda-forge
typing_extensions         4.7.1              pyha770c72_0    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
umap-learn                0.5.3           py310h5588dad_1    conda-forge
unicodedata2              15.0.0          py310h8d17308_0    conda-forge
uri-template              1.3.0              pyhd8ed1ab_0    conda-forge
urllib3                   2.0.4              pyhd8ed1ab_0    conda-forge
vc                        14.3                h64f974e_17    conda-forge
vc14_runtime              14.36.32532         hfdfe4a8_17    conda-forge
vispy                     0.11.0          py310h9b08ddd_1    conda-forge
vs2015_runtime            14.36.32532         h05e6639_17    conda-forge
wcwidth                   0.2.6              pyhd8ed1ab_0    conda-forge
webcolors                 1.13               pyhd8ed1ab_0    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          1.6.1              pyhd8ed1ab_0    conda-forge
wheel                     0.41.1             pyhd8ed1ab_0    conda-forge
widgetsnbextension        4.0.8              pyhd8ed1ab_0    conda-forge
win32_setctime            1.1.0              pyhd8ed1ab_0    conda-forge
win_inet_pton             1.1.0              pyhd8ed1ab_6    conda-forge
winpty                    0.4.3                         4    conda-forge
wrapt                     1.15.0          py310h8d17308_0    conda-forge
x264                      1!164.3095           h8ffe710_2    conda-forge
x265                      3.5                  h2d74725_3    conda-forge
xorg-libxau               1.0.11               hcd874cb_0    conda-forge
xorg-libxdmcp             1.1.3                hcd874cb_0    conda-forge
xyzservices               2023.7.0           pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
y-py                      0.5.5           py310h87d50f1_2    conda-forge
yaml                      0.2.5                h8ffe710_2    conda-forge
ypy-websocket             0.8.2              pyhd8ed1ab_0    conda-forge
zarr                      2.16.0             pyhd8ed1ab_0    conda-forge
zeromq                    4.3.4                h0e60522_1    conda-forge
zfp                       1.0.0                h63175ca_3    conda-forge
zict                      3.0.0              pyhd8ed1ab_0    conda-forge
zipp                      3.16.2             pyhd8ed1ab_0    conda-forge
zlib-ng                   2.0.7                hcfcfb64_0    conda-forge
zstd                      1.5.2                h12be248_7    conda-forge
my local test results with napari 0.4.17
platform win32 -- Python 3.10.12, pytest-7.4.0, pluggy-1.2.0
PyQt5 5.15.9 -- Qt runtime 5.15.8 -- Qt compiled 5.15.8
rootdir: C:\Users\mazo260d\Documents\GitHub\napari-clusters-plotter
plugins: anyio-3.7.1, napari-0.4.17, napari-plugin-engine-0.2.0, npe2-0.6.2, qt-4.2.0
collected 23 items

napari_clusters_plotter\_tests\test_clustering.py .KMEANS predictions finished.
.F...                                                         [ 26%]
napari_clusters_plotter\_tests\test_dimension_reduction.py .......                                               [ 56%]
napari_clusters_plotter\_tests\test_dock_widget.py ...                                                           [ 69%]
napari_clusters_plotter\_tests\test_plotter.py ....                                                              [ 86%]
napari_clusters_plotter\_tests\test_utils.py ...                                                                 [100%]

====================================================== FAILURES =======================================================
_______________________________________________ test_hdbscan_clustering _______________________________________________

    def test_hdbscan_clustering():
        # create an example dataset
        n_samples = 100
        data = datasets.make_moons(n_samples=n_samples, random_state=1, noise=0.05)
        true_class = data[1]
        measurements = data[0]

        from napari_clusters_plotter._clustering import hdbscan_clustering

        min_cluster_size = 5
        min_samples = 2  # number of samples that should be included in one cluster

        # hdbscan_clustering returns (str, np.ndarray), where the first item is algorithm name
>       result = hdbscan_clustering(
            measurements,
            min_cluster_size=min_cluster_size,
            min_samples=min_samples,
        )

napari_clusters_plotter\_tests\test_clustering.py:129:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
napari_clusters_plotter\_utilities.py:159: in wrapper
    embedded = func(*new_args, **kwargs)
napari_clusters_plotter\_clustering.py:559: in hdbscan_clustering
    return "HDBSCAN", clustering_hdbscan.fit_predict(reg_props)
..\..\..\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\hdbscan\hdbscan_.py:1243: in fit_predict
    self.fit(X)
..\..\..\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\hdbscan\hdbscan_.py:1205: in fit
    ) = hdbscan(clean_data, **kwargs)
..\..\..\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\hdbscan\hdbscan_.py:884: in hdbscan
    _tree_to_labels(
..\..\..\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\hdbscan\hdbscan_.py:80: in _tree_to_labels
    labels, probabilities, stabilities = get_clusters(
hdbscan\\_hdbscan_tree.pyx:659: in hdbscan._hdbscan_tree.get_clusters
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   TypeError: 'numpy.float64' object cannot be interpreted as an integer

hdbscan\\_hdbscan_tree.pyx:733: TypeError
================================================== warnings summary ===================================================
..\..\..\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\imageio_ffmpeg\_utils.py:6
  C:\Users\mazo260d\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\imageio_ffmpeg\_utils.py:6: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    from pkg_resources import resource_filename

..\..\..\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\pkg_resources\__init__.py:2871
  C:\Users\mazo260d\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\pkg_resources\__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

..\..\..\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\pkg_resources\__init__.py:2871
..\..\..\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\pkg_resources\__init__.py:2871
..\..\..\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\pkg_resources\__init__.py:2871
..\..\..\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\pkg_resources\__init__.py:2871
  C:\Users\mazo260d\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\pkg_resources\__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

..\..\..\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\vispy\app\backends\_qt.py:93
  C:\Users\mazo260d\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\vispy\app\backends\_qt.py:93: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    if LooseVersion(QT_VERSION_STR) >= '5.4.0':

..\..\..\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\setuptools\_distutils\version.py:345
  C:\Users\mazo260d\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\setuptools\_distutils\version.py:345: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    other = LooseVersion(other)

napari_clusters_plotter/_tests/test_clustering.py::test_kmeans_clustering
napari_clusters_plotter/_tests/test_clustering.py::test_kmeans_clustering
napari_clusters_plotter/_tests/test_clustering.py::test_kmeans_clustering
  C:\Users\mazo260d\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\sklearn\cluster\_kmeans.py:1412: FutureWarning: The default value of `n_init` will change from 10 to 'auto' in 1.4. Set the value of `n_init` explicitly to suppress the warning
    super()._check_params_vs_input(X, default_n_init=10)

napari_clusters_plotter/_tests/test_clustering.py::test_kmeans_clustering
napari_clusters_plotter/_tests/test_clustering.py::test_kmeans_clustering
napari_clusters_plotter/_tests/test_clustering.py::test_gaussian_mixture_model
napari_clusters_plotter/_tests/test_clustering.py::test_gaussian_mixture_model
  C:\Users\mazo260d\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\sklearn\cluster\_kmeans.py:1436: UserWarning: KMeans is known to have a memory leak on Windows with MKL, when there are less chunks than available threads. You can avoid it by setting the environment variable OMP_NUM_THREADS=1.
    warnings.warn(

napari_clusters_plotter/_tests/test_clustering.py::test_agglomerative_clustering
napari_clusters_plotter/_tests/test_clustering.py::test_agglomerative_clustering
  C:\Users\mazo260d\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\sklearn\cluster\_agglomerative.py:303: UserWarning: the number of connected components of the connectivity matrix is 3 > 1. Completing it to avoid stopping the tree early.
    connectivity, n_connected_components = _fix_connectivity(

napari_clusters_plotter/_tests/test_dimension_reduction.py::test_bad_measurements
  C:\Users\mazo260d\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\napari\utils\_testsupport.py:261: UserWarning: The following Widgets leaked!: {<PyQt5.QtWidgets.QFrame object at 0x0000021C4CCDE050>, <napari_clusters_plotter._dimensionality_reduction.DimensionalityReductionWidget object at 0x0000021C51D71BD0>, <PyQt5.QtWidgets.QFrame object at 0x0000021C513BC9D0>}.

              Note: If other tests are failing it is likely that widgets will leak
              as they will be (indirectly) attached to the tracebacks of previous failures.
              Please only consider this an error if all other tests are passing.

    warnings.warn(msg)

napari_clusters_plotter/_tests/test_dimension_reduction.py::test_mds
  C:\Users\mazo260d\mambaforge\envs\napari-clusters-plotter-env-17\lib\site-packages\sklearn\manifold\_mds.py:298: FutureWarning: The default value of `normalized_stress` will change to `'auto'` in version 1.4. To suppress this warning, manually set the value of `normalized_stress`.
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================================== short test summary info ===============================================
FAILED napari_clusters_plotter/_tests/test_clustering.py::test_hdbscan_clustering - TypeError: 'numpy.float64' object cannot be interpreted as an integer
===================================== 1 failed, 22 passed, 19 warnings in 37.83s ======================================

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants