From a09771da60a4d5e16d1b45d42d0066a7406fb530 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Mon, 16 Dec 2024 16:24:57 -0800 Subject: [PATCH] Use numpy.intc for indexes, not int32 We use 'int' internally for particle indexes, not int32_t, so use numpy.intc in Python. This *should* fix usage of ParticleIndex in Windows builds. --- modules/kernel/pyext/IMP_kernel.numpy.i | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/kernel/pyext/IMP_kernel.numpy.i b/modules/kernel/pyext/IMP_kernel.numpy.i index 3efc81ee85..1e0b5a5265 100644 --- a/modules/kernel/pyext/IMP_kernel.numpy.i +++ b/modules/kernel/pyext/IMP_kernel.numpy.i @@ -235,12 +235,12 @@ PyObject *_get_sphere_derivatives_numpy(IMP::Model *m, PyObject *m_pyobj) %} } -// Always treat particle indexes as numpy.int32 when using numpy +// Always treat particle indexes as numpy.intc when using numpy #if IMP_KERNEL_HAS_NUMPY %pythoncode %{ try: import numpy - ParticleIndex = numpy.int32 + ParticleIndex = numpy.intc except ImportError: pass %}