def sum(mat, axis, target=None):
 m = _eigenmat.get_leading_dimension(mat.p_mat)
 n = _eigenmat.get_nonleading_dimension(mat.p_mat)
 if (axis == 0):
  if (not target):
   target = empty((1, n))
 elif (axis == 1):
  if (not target):
   target = empty((m, 1))
 err_code = _eigenmat.sum_by_axis(mat.p_mat, target.p_mat, ct.c_int(axis))
 if err_code:
  raise generate_exception(err_code)
 return target

def sum ( mat , axis , target = None ) : m = _eigenmat . get_leading_dimension ( mat . p_mat ) n = _eigenmat . get_nonleading_dimension ( mat . p_mat ) if ( axis == 0 ) : if ( not target ) : target = empty ( ( 1 , n ) ) elif ( axis == 1 ) : if ( not target ) : target = empty ( ( m , 1 ) ) err_code = _eigenmat . sum_by_axis ( mat . p_mat , target . p_mat , ct . c_int ( axis ) ) if err_code : raise generate_exception ( err_code ) return target
wrapper around sqlalchemy .