def zdivide(x, y):
    """
    Return `x`/`y`, with 0 instead of NaN where `y` is 0.

    Parameters
    ----------
    x : array_like
      Numerator
    y : array_like
      Denominator

    Returns
    -------
    z : ndarray
      Quotient `x`/`y`
    """

    # See https://stackoverflow.com/a/37977222
    return np.divide(x, y, out=np.zeros_like(x), where=(y != 0))
def zdivide ( x , y ) : return np . divide ( x , y , out = np . zeros_like ( x ) , where = ( y != 0 ) )
Return `x`/`y`, with 0 instead of NaN where `y` is 0.

    Parameters
    ----------
    x : array_like
      Numerator
    y : array_like
      Denominator

    Returns
    -------
    z : ndarray
      Quotient `x`/`y`