Skip to content

Commit

Permalink
Be more specific about types in unique_int_1d
Browse files Browse the repository at this point in the history
Hopefully it will solves issues on windows.
  • Loading branch information
jbarnoud authored and richardjgowers committed Jun 26, 2018
1 parent e7ba5c3 commit a0bc631
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package/MDAnalysis/lib/_cutil.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ __all__ = ['unique_int_1d', ]

@cython.boundscheck(False) # turn off bounds-checking for entire function
@cython.wraparound(False) # turn off negative index wrapping for entire function
def unique_int_1d(np.ndarray[np.int_t, ndim=1] values):
def unique_int_1d(np.ndarray[np.int64_t, ndim=1] values):
"""
Find the unique elements of a 1D array of integers.
Expand All @@ -51,7 +51,7 @@ def unique_int_1d(np.ndarray[np.int_t, ndim=1] values):
cdef int i = 0
cdef int j = 0
cdef int n_values = values.shape[0]
cdef np.ndarray[np.int_t, ndim=1] result = np.empty(n_values, dtype=int)
cdef np.ndarray[np.int64_t, ndim=1] result = np.empty(n_values, dtype=np.int64)

if n_values == 0:
return result
Expand Down

0 comments on commit a0bc631

Please sign in to comment.