code: def one_over(x):
      """Vectorized 1/x, treating x==0 manually"""
      x = np.array(x, float)
      near_zero = np.isclose(x, 0)
      x[near_zero] = np.inf
      x[~near_zero] = 1 / x[~near_zero]
      return x
  
file_path: matplotlib/galleries/examples/subplots_axes_and_figures/secondary_axis.py
imports: import datetime
  import matplotlib.pyplot
  import numpy
  import matplotlib.dates
  from matplotlib.ticker import AutoMinorLocator
label_desc: Use image node_id 3 for calling a global function with example usage: one_over(x) and returns: x