From 01f4277f7acf8d7ede7b8a194c57eb906516cdbc Mon Sep 17 00:00:00 2001 From: Tyler Reddy Date: Sat, 16 Dec 2023 10:01:07 -0700 Subject: [PATCH] MAINT: encore Windows type fixes (#4369) * in NumPy `2.0.0`, the default integer size on Windows will be 64-bit; we have 10 related test failures on Windows alongside NumPy `main` at the moment, and this patch fixes those failures by forcing a reversion to the old behavior, effectively kicking the can down the road * I think we're going to proceed with a similar solution upstream for now (i.e., https://github.com/scipy/scipy/issues/19605#issuecomment-1852698295); [skip cirrus] --- package/MDAnalysis/analysis/encore/clustering/affinityprop.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/MDAnalysis/analysis/encore/clustering/affinityprop.pyx b/package/MDAnalysis/analysis/encore/clustering/affinityprop.pyx index cd4ba3cf756..be3d00dca79 100644 --- a/package/MDAnalysis/analysis/encore/clustering/affinityprop.pyx +++ b/package/MDAnalysis/analysis/encore/clustering/affinityprop.pyx @@ -99,7 +99,7 @@ def AffinityPropagation(s, preference, float lam, int max_iterations, int conver # Prepare input and ouput arrays cdef numpy.ndarray[numpy.float32_t, ndim=1] matndarray = numpy.ascontiguousarray(s._elements, dtype=numpy.float32) - cdef numpy.ndarray[long, ndim=1] clusters = numpy.zeros((s.size),dtype=long) + cdef numpy.ndarray[long, ndim=1] clusters = numpy.zeros((s.size),dtype=numpy.dtype("long")) # run C module Affinity Propagation iterations = CAffinityPropagation(matndarray.data, cn, lam, max_iterations, convergence, noise, clusters.data)