Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Commit 292767e

Browse files
committed
whitespace only fixes to numpy.lowlevel
Fix indentation and trailing whitespace
1 parent 35c5b4c commit 292767e

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

dtcwt/numpy/lowlevel.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def colfilter(X, h):
6060
.. codeauthor:: Nick Kingsbury, Cambridge University, August 2000
6161
6262
"""
63-
63+
6464
# Interpret all inputs as arrays
6565
X = asfarray(X)
6666
h = as_column_vector(h)
@@ -90,10 +90,10 @@ def coldfilt(X, ha, hb):
9090
9191
ext top edge bottom edge ext
9292
Level 1: ! | ! | !
93-
odd filt on . b b b b a a a a a a a a b b b b
93+
odd filt on . b b b b a a a a a a a a b b b b
9494
odd filt on . a a a a b b b b b b b b a a a a
9595
Level 2: ! | ! | !
96-
+q filt on x b b a a a a b b
96+
+q filt on x b b a a a a b b
9797
-q filt on o a a b b b b a a
9898
9999
The output is decimated by two from the input sample rate and the results
@@ -146,8 +146,8 @@ def coldfilt(X, ha, hb):
146146
else:
147147
s2 = slice(0, r2, 2)
148148
s1 = slice(1, r2, 2)
149-
150-
# Perform filtering on columns of extended matrix X(xe,:) in 4 ways.
149+
150+
# Perform filtering on columns of extended matrix X(xe,:) in 4 ways.
151151
Y[s1,:] = _column_convolve(X[xe[t-1],:],hao) + _column_convolve(X[xe[t-3],:],hae)
152152
Y[s2,:] = _column_convolve(X[xe[t],:],hbo) + _column_convolve(X[xe[t-2],:],hbe)
153153

@@ -159,22 +159,22 @@ def colifilt(X, ha, hb):
159159
samples. Both filters should be even length, and h should be approx linear
160160
phase with a quarter sample advance from its mid pt (i.e `:math:`|h(m/2)| >
161161
|h(m/2 + 1)|`).
162-
162+
163163
.. code-block:: text
164164
165165
ext left edge right edge ext
166166
Level 2: ! | ! | !
167-
+q filt on x b b a a a a b b
167+
+q filt on x b b a a a a b b
168168
-q filt on o a a b b b b a a
169169
Level 1: ! | ! | !
170-
odd filt on . b b b b a a a a a a a a b b b b
170+
odd filt on . b b b b a a a a a a a a b b b b
171171
odd filt on . a a a a b b b b b b b b a a a a
172-
172+
173173
The output is interpolated by two from the input sample rate and the
174174
results from the two filters, Ya and Yb, are interleaved to give Y.
175175
Symmetric extension with repeated end samples is used on the composite X
176176
columns before each filter is applied.
177-
177+
178178
.. codeauthor:: Rich Wareham <rjw57@cantab.net>, August 2013
179179
.. codeauthor:: Cian Shaffrey, Cambridge University, August 2000
180180
.. codeauthor:: Nick Kingsbury, Cambridge University, August 2000
@@ -207,24 +207,24 @@ def colifilt(X, ha, hb):
207207
# Set up vector for symmetric extension of X with repeated end samples.
208208
# Use 'reflect' so r < m2 works OK.
209209
xe = reflect(np.arange(-m2, r+m2, dtype=np.int), -0.5, r-0.5)
210-
210+
211211
t = np.arange(3, r+m, 2)
212212
if np.sum(ha*hb) > 0:
213213
ta = t
214214
tb = t - 1
215215
else:
216216
ta = t - 1
217217
tb = t
218-
218+
219219
# Select odd and even samples from ha and hb. Note that due to 0-indexing
220220
# 'odd' and 'even' are not perhaps what you might expect them to be.
221221
hao = as_column_vector(ha[0:m:2])
222222
hae = as_column_vector(ha[1:m:2])
223223
hbo = as_column_vector(hb[0:m:2])
224224
hbe = as_column_vector(hb[1:m:2])
225-
225+
226226
s = np.arange(0,r*2,4)
227-
227+
228228
Y[s,:] = _column_convolve(X[xe[tb-2],:],hae)
229229
Y[s+1,:] = _column_convolve(X[xe[ta-2],:],hbe)
230230
Y[s+2,:] = _column_convolve(X[xe[tb ],:],hao)
@@ -242,16 +242,16 @@ def colifilt(X, ha, hb):
242242
else:
243243
ta = t - 1
244244
tb = t
245-
245+
246246
# Select odd and even samples from ha and hb. Note that due to 0-indexing
247247
# 'odd' and 'even' are not perhaps what you might expect them to be.
248248
hao = as_column_vector(ha[0:m:2])
249249
hae = as_column_vector(ha[1:m:2])
250250
hbo = as_column_vector(hb[0:m:2])
251251
hbe = as_column_vector(hb[1:m:2])
252-
252+
253253
s = np.arange(0,r*2,4)
254-
254+
255255
Y[s,:] = _column_convolve(X[xe[tb],:],hao)
256256
Y[s+1,:] = _column_convolve(X[xe[ta],:],hbo)
257257
Y[s+2,:] = _column_convolve(X[xe[tb],:],hae)

0 commit comments

Comments
 (0)