code: def ddtohms(xsky,ysky,verbose=False,precision=6):
      
      xskyh = xsky /15.
      xskym = (xskyh - np.floor(xskyh)) * 60.
      xskys = (xskym - np.floor(xskym)) * 60.
      yskym = (np.abs(ysky) - np.floor(np.abs(ysky))) * 60.
      yskys = (yskym - np.floor(yskym)) * 60.
  
      fmt = "%."+repr(precision)+"f"
      if isinstance(xskyh,np.ndarray):
          rah,dech = [],[]
          for i in range(len(xskyh)):
              rastr = repr(int(xskyh[i]))+':'+repr(int(xskym[i]))+':'+fmt%(xskys[i])
              decstr = repr(int(ysky[i]))+':'+repr(int(yskym[i]))+':'+fmt%(yskys[i])
              rah.append(rastr)
              dech.append(decstr)
              if verbose:
                  print('RA = ',rastr,', Dec = ',decstr)
      else:
          rastr = repr(int(xskyh))+':'+repr(int(xskym))+':'+fmt%(xskys)
          decstr = repr(int(ysky))+':'+repr(int(yskym))+':'+fmt%(yskys)
          rah = rastr
          dech = decstr
          if verbose:
              print('RA = ',rastr,', Dec = ',decstr)
  
      return rah,dech
docs: Convert sky position(s) from decimal degrees to HMS format.