Implement the ReLU (Rectified Linear Unit) activation function. Given a list or array of values, return a new array where each negative value is replaced with 0 and positive values remain unchanged.
import numpy as np
def relu(z):
return np.maximum(0, np.array(z, dtype=np.float64)).tolist()np.maximum(0, z) to element-wise compare each value with 0 and keep the larger one.