def assign_scalar(self, alpha):
    """
    Assign scalar alpha to every element of the matrix.
    """

    err_code = _eigenmat.assign_scalar(self.p_mat, ct.c_float(alpha))
    if err_code:
      raise generate_exception(err_code)

    return self

    Assign scalar alpha to every element of the matrix.
    
eigenmat/eigenmat.py