parameters: (result, x, y)
return_statement: return result
docstring: If this is a reversed op, then flip x,y
  
      If we have an integer value (or array in y)
      and we have 0's, fill them with np.nan,
      return the result.
  
      Mask the nan's from x.
docstring_summary: If this is a reversed op, then flip x,y
docstring_tokens: If this is a reversed op then flip x y
function: def fill_zeros(result, x, y):
      """
      If this is a reversed op, then flip x,y
  
      If we have an integer value (or array in y)
      and we have 0's, fill them with np.nan,
      return the result.
  
      Mask the nan's from x.
      """
      if is_float_dtype(result.dtype):
          return result
  
      is_variable_type = hasattr(y, "dtype") or hasattr(y, "type")
      is_scalar_type = is_scalar(y)
  
      if not is_variable_type and not is_scalar_type:
          return result
  
      if is_scalar_type:
          y = np.array(y)
  
      if is_integer_dtype(y.dtype):
  
          if (y == 0).any():
  
              # GH#7325, mask and nans must be broadcastable (also: GH#9308)
              # Raveling and then reshaping makes np.putmask faster
              mask = ((y == 0) & ~np.isnan(result)).ravel()
  
              shape = result.shape
              result = result.astype("float64", copy=False).ravel()
  
              np.putmask(result, mask, np.nan)
  
              result = result.reshape(shape)
  
      return result
function_tokens: def fill_zeros ( result , x , y ) : if is_float_dtype ( result . dtype ) : return result is_variable_type = hasattr ( y , "dtype" ) or hasattr ( y , "type" ) is_scalar_type = is_scalar ( y ) if not is_variable_type and not is_scalar_type : return result if is_scalar_type : y = np . array ( y ) if is_integer_dtype ( y . dtype ) : if ( y == 0 ) . any ( ) : # GH#7325, mask and nans must be broadcastable (also: GH#9308) # Raveling and then reshaping makes np.putmask faster mask = ( ( y == 0 ) & ~ np . isnan ( result ) ) . ravel ( ) shape = result . shape result = result . astype ( "float64" , copy = False ) . ravel ( ) np . putmask ( result , mask , np . nan ) result = result . reshape ( shape ) return result