Skip to content

Commit 8d8efd5

Browse files
committed
Changed for loops
1 parent 05c9f13 commit 8d8efd5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dedisperse/dedisperse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def dedisperse(samples, highest_x=None, max_delay=0, disperion_measure=None):
2323
delays_per_sample = np.round(np.linspace(disperion_measure, 0, samples.shape[1])).astype(int)
2424

2525
# Loop over the frequencies
26-
for i, _ in enumerate(delays_per_sample):
26+
for i in range(delays_per_sample.size):
2727

2828
# Temporary array that is used to later delay the frequency
2929
temporary_samples = []
@@ -71,7 +71,7 @@ def find_line(samples, start_sample_index, max_delay, pulsar_intensity):
7171
failed_to_find_line = True
7272

7373
# Loop through the frequencies
74-
for f, _ in enumerate(samples[1]):
74+
for f in range(samples[1].size):
7575

7676
# Loop through previous intensity until the max delay is reached
7777
for i, intensity in enumerate(samples[:, f][previous_index:previous_index + max_delay]):

0 commit comments

Comments
 (0)