Generation

generate functionSun, 13 Nov 2022

numpy compute infinity norm of array

import numpy as np def infinity_norm(array): return np.max(np.abs(array)) infinity_norm(np.array([1, 2, 3]))

Questions about programming?Chat with your personal AI assistant