Computer Vision, Data Augmentation, Object Detection, Deep Learning, Data Science.
array2.shape # Create a new zeros array with the same shape as array2 resized_array1 = np.zeros(shape_array2, dtype=array1.dtype) # Copy the contents of array1 into the resized array height, width = min(shape_array2[0], array1.shape[0]), min(shape_array2[1], array1.shape[1]) resized_array1[:height,