- qspec. fraction ( r )[source]
-
The numerator and denominator of a fraction.
- Parameters:
-
- rRational | str
A
sympy.Rationalor astrwith the format"num/denom".
- Returns:
-
- (num, denom)tuple[int, int]
The numerator and denominator of
r.
- Raises:
-
- TypeError
If
ris neither asympy.Rationalnor astr.