def _sum_of_squares(a, axis=0):
 (a, axis) = _chk_asarray(a, axis)
 return np.sum((a * a), axis)

def _sum_of_squares ( a , axis = 0 ) : ( a , axis ) = _chk_asarray ( a , axis ) return np . sum ( ( a * a ) , axis )
squares each element of the input array .