verify if numpy array is vectoe code example Example: numpy check vector if weight.ndim != 1: raise ValueError("The is not a row vector.")