Python Get Dimension Of Numpy Array To Scalar Definition In Matrix