obspy.core.event.magnitude.Magnitude._cast_type

Magnitude._cast_type(key, value)

Cast type of value to type required in _types dict.

Parameters:
  • key (str) The key from __setattr__.
  • value The value being set to key.
Returns:

value cast to correct type.