Skip to content

Commit 32f4788

Browse files
fix task 2 loop
1 parent 7532f39 commit 32f4788

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tasks.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,10 @@ def ReLU(arr, cutoff=0):
3838
"""
3939
Searches for values above cutoff in np array, changes them if exceeding it.
4040
"""
41-
for x in arr:
42-
if arr[x] < cutoff:
43-
arr[x] = cutoff
41+
for x in range(len(arr)):
42+
if arr[x] < cutoff:
43+
arr[x] = cutoff
4444
return arr
45-
4645
# -----------------------------------------------
4746

4847

0 commit comments

Comments
 (0)