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:

int

Raises:

See also

to_roman

Examples

>>> from_roman("V")
5
>>> from_roman("MMMMCCCLXVII")
4367