I am trying to see if each value in array is less then 0 then output 0, else output the number itself. The output must have the same dimensions as the input. Currently the input is a 3 by 4 but output is a list. How do I get the output size the same (3 by 4 array)?
input = [[1,2,3,4],[4,5,-6,-7],[8,9,10,11]]
output= []
for i in input:
if i < 0:
value = 0
output.append(value)
else:
value= i
output.append(value)