from_roman
- plasmapy.utils.roman.from_roman(s: str) int [source]
Convert a Roman numeral to an integer.
- Parameters:
s (
str
) – A Roman numeral.- Returns:
result – The positive integer corresponding to the Roman numeral.
- Return type:
- Raises:
InvalidRomanNumeralError – The argument is not a valid Roman numeral.
See also
Examples
>>> from_roman("V") 5 >>> from_roman("MMMMCCCLXVII") 4367