code: def fshdev(k):
      
      k = np.array(k)
      if len(k.shape) != 0:
          n = k.shape[0]
      else:
          n = 1
      R1 = random.random(size=n)
      R2 = random.random(size=n)
      L = np.exp(-2 * k)
      a = R1 * (1 - L) + L
      fac = np.sqrt(-np.log(a)/(2 * k))
      inc = 90. - np.degrees(2 * np.arcsin(fac))
      dec = np.degrees(2 * np.pi * R2)
      if n == 1:
          return dec[0], inc[0]  # preserve backward compatibility
      else:
          return dec, inc
docs: Generate a random draw from a Fisher distribution with mean declination
      of 0 and inclination of 90 with a specified kappa.
  
      Parameters
      ----------
      k : kappa (precision parameter) of the distribution
          k can be a single number or an array of values
  
      Returns
      ----------
      dec, inc : declination and inclination of random Fisher distribution draw
                 if k is an array, dec, inc are returned as arrays, otherwise, single values