Skip to content

Commit e611bc0

Browse files
committed
cleanup wrapping code to reduce warnings
1 parent 3a4709a commit e611bc0

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

moleculekit/wrapping/wrapping.pyx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
# cython: cdivision=True
22

33
import numpy as np
4-
from math import sqrt
54
cimport numpy as np
6-
from libcpp.vector cimport vector
7-
from libcpp cimport bool
8-
from libc.math cimport round, sqrt, acos, floor, fabs
9-
from cython.parallel import prange
5+
from libc.math cimport round, fabs
106

117
# We now need to fix a datatype for our arrays. I've used the variable
128
# DTYPE for this, which is assigned to the usual NumPy runtime
@@ -44,7 +40,6 @@ def disjoint_set_find(
4440
return parent[x]
4541
else:
4642
return x
47-
return x
4843

4944
@cython.boundscheck(False) # turn off bounds-checking for entire function
5045
@cython.wraparound(False) # turn off negative index wrapping for entire function
@@ -77,7 +72,7 @@ def get_bonded_groups(
7772
UINT32_t[:] parent,
7873
UINT32_t[:] size,
7974
):
80-
cdef int i, j, k
75+
cdef int i
8176
cdef int n_bonds = bonds.shape[0]
8277

8378
# Iterate over the bonds
@@ -101,7 +96,6 @@ def calculate(
10196
np.ndarray[FLOAT32_t, ndim=1] center,
10297
):
10398
cdef int f, i, g, a, start_idx, end_idx, k, n
104-
cdef int n_atoms = coords.shape[0]
10599
cdef int n_frames = coords.shape[2]
106100
cdef int n_groups = groups.shape[0]
107101
cdef int n_centersel = centersel.shape[0]

0 commit comments

Comments
 (0)