Python Get Dimension Of Numpy Array To Scalar And Functional Processes