diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2014-07-30 18:06:28 -0600 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2014-07-31 21:21:17 +0200 |
commit | 01b0d7e82211b581aaff925e3ccc36cff9ac1895 (patch) | |
tree | 8ec68353d5f09b9f0411948f1345ec79f5443b4c /numpy/lib/arraysetops.py | |
parent | dec6658cdc10a23ad0e733fb52a814306033d88c (diff) | |
download | numpy-01b0d7e82211b581aaff925e3ccc36cff9ac1895.tar.gz |
STY: Make files in numpy/lib PEP8 compliant.
The rules enforced are the same as those used for scipy.
Diffstat (limited to 'numpy/lib/arraysetops.py')
-rw-r--r-- | numpy/lib/arraysetops.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py index 42555d30f..2d98c35d2 100644 --- a/numpy/lib/arraysetops.py +++ b/numpy/lib/arraysetops.py @@ -245,7 +245,7 @@ def intersect1d(ar1, ar2, assume_unique=False): # Might be faster than unique( intersect1d( ar1, ar2 ) )? ar1 = unique(ar1) ar2 = unique(ar2) - aux = np.concatenate( (ar1, ar2) ) + aux = np.concatenate((ar1, ar2)) aux.sort() return aux[:-1][aux[1:] == aux[:-1]] @@ -282,13 +282,13 @@ def setxor1d(ar1, ar2, assume_unique=False): ar1 = unique(ar1) ar2 = unique(ar2) - aux = np.concatenate( (ar1, ar2) ) + aux = np.concatenate((ar1, ar2)) if aux.size == 0: return aux aux.sort() # flag = ediff1d( aux, to_end = 1, to_begin = 1 ) == 0 - flag = np.concatenate( ([True], aux[1:] != aux[:-1], [True] ) ) + flag = np.concatenate(([True], aux[1:] != aux[:-1], [True])) # flag2 = ediff1d( flag ) == 0 flag2 = flag[1:] == flag[:-1] return aux[flag2] @@ -371,7 +371,7 @@ def in1d(ar1, ar2, assume_unique=False, invert=False): ar1, rev_idx = np.unique(ar1, return_inverse=True) ar2 = np.unique(ar2) - ar = np.concatenate( (ar1, ar2) ) + ar = np.concatenate((ar1, ar2)) # We need this to be a stable sort, so always use 'mergesort' # here. The values from the first array should always come before # the values from the second array. @@ -381,8 +381,8 @@ def in1d(ar1, ar2, assume_unique=False, invert=False): bool_ar = (sar[1:] != sar[:-1]) else: bool_ar = (sar[1:] == sar[:-1]) - flag = np.concatenate( (bool_ar, [invert]) ) - indx = order.argsort(kind='mergesort')[:len( ar1 )] + flag = np.concatenate((bool_ar, [invert])) + indx = order.argsort(kind='mergesort')[:len(ar1)] if assume_unique: return flag[indx] @@ -417,7 +417,7 @@ def union1d(ar1, ar2): array([-2, -1, 0, 1, 2]) """ - return unique( np.concatenate( (ar1, ar2) ) ) + return unique(np.concatenate((ar1, ar2))) def setdiff1d(ar1, ar2, assume_unique=False): """ |