Skip to content

brahmap.base.LowerTypeCastWarning

Bases: Warning

A custom warning raised when an array is cast to a lower precision data type.

Parameters:

Name Type Description Default
message str

The descriptive warning message

required
Source code in brahmap/base/misc.py
class LowerTypeCastWarning(Warning):
    """A custom warning raised when an array is cast to a lower precision data type.

    Parameters
    ----------
    message : str
        The descriptive warning message
    """

    def __init__(self, message: str) -> None:
        self.message = message

    def __str__(self):
        return repr(self.message)