Skip to content

Commit

Permalink
MAINT: encore Windows type fixes (#4369)
Browse files Browse the repository at this point in the history
* 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., scipy/scipy#19605 (comment));

[skip cirrus]
  • Loading branch information
tylerjereddy authored Dec 16, 2023
1 parent 75d240e commit 01f4277
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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(<float*>matndarray.data, cn, lam, max_iterations, convergence, noise, <long*>clusters.data)
Expand Down

0 comments on commit 01f4277

Please sign in to comment.