import numpy as np a = np.arange(np.maximum(1, 2)).reshape(np.minimum(1, 2), np.absolute(-3)) a.reshape(3, 4)