featuremapper/distribution.py
def _safe_divide(self, numerator, denominator):
        """
        Division routine that avoids division-by-zero errors
        (returning zero in such cases) but keeps track of them
        for undefined_values().
        """
        if denominator == 0:
            self.undefined_vals += 1
            return 0
        else:
            return numerator/denominator

        Division routine that avoids division-by-zero errors
        (returning zero in such cases) but keeps track of them
        for undefined_values().
        
Division routine that avoids division-by-zero errors
(returning zero in such cases) but keeps track of them
for undefined_values().
Division routine that avoids division - by - zero errors ( returning zero in such cases ) but keeps track of them for undefined_values () .
def _safe_divide(self, numerator, denominator):
        if denominator == 0:
            self.undefined_vals += 1
            return 0
        else:
            return numerator/denominator
def _safe_divide ( self , numerator , denominator ) : if denominator == 0 : self . undefined_vals += 1 return 0 else : return numerator / denominator
Division routine that avoids division-by-zero errors
(returning zero in such cases) but keeps track of them
for undefined_values().
Division routine that avoids division - by - zero errors ( returning zero in such cases ) but keeps track of them for undefined_values () .
"""
        Division routine that avoids division-by-zero errors
        (returning zero in such cases) but keeps track of them
        for undefined_values().
        """
self
numerator
denominator