shape (required)Tuple whose elements are the array size in each dimension. Each| numpy.org
There are many approaches to speeding up Python code; applying multiple approaches can make your code even faster.| Python⇒Speed