- qspec. half_integer_to_str ( val , symbol='/' )[source]
-
Convert a half-integer into a rational
strrepresentation, e.g.,"3/2".- Parameters:
-
- valscalar
A half-integer value.
- symbolstr
The symbol to use for the fraction.
- Returns:
-
- sstr
A rational
strrepresentation of the half-integer.
- Raises:
-
- ValueError
If
valis not a multiple of 1/2.