def encode(epochs, iso_8601=True):  # @NoSelf
        """
        Encodes the epoch(s) into UTC string(s).

        For CDF_EPOCH:
                The input should be either a float or list of floats
                (in numpy, a np.float64 or a np.ndarray of np.float64)
                Each epoch is encoded, by default to a ISO 8601 form:
                2004-05-13T15:08:11.022
                Or, if iso_8601 is set to False,
                13-May-2004 15:08:11.022
        For CDF_EPOCH16:
                The input should be either a complex or list of
                complex(in numpy, a np.complex128 or a np.ndarray of np.complex128)
                Each epoch is encoded, by default to a ISO 8601 form:
                2004-05-13T15:08:11.022033044055
                Or, if iso_8601 is set to False,
                13-May-2004 15:08:11.022.033.044.055
        For TT2000:
                The input should be either a int or list of ints
                (in numpy, a np.int64 or a np.ndarray of np.int64)
                Each epoch is encoded, by default to a ISO 8601 form:
                2008-02-02T06:08:10.10.012014016
                Or, if iso_8601 is set to False,
                02-Feb-2008 06:08:10.012.014.016
        """
        if (isinstance(epochs, int) or isinstance(epochs, np.int64)):
            return CDFepoch.encode_tt2000(epochs, iso_8601)
        elif (isinstance(epochs, float) or isinstance(epochs, np.float64)):
            return CDFepoch.encode_epoch(epochs, iso_8601)
        elif (isinstance(epochs, complex) or isinstance(epochs, np.complex128)):
            return CDFepoch.encode_epoch16(epochs, iso_8601)
        elif (isinstance(epochs, list) or isinstance(epochs, np.ndarray)):
            if (isinstance(epochs[0], int) or isinstance(epochs[0], np.int64)):
                return CDFepoch.encode_tt2000(epochs, iso_8601)
            elif (isinstance(epochs[0], float) or
                  isinstance(epochs[0], np.float64)):
                return CDFepoch.encode_epoch(epochs, iso_8601)
            elif (isinstance(epochs[0], complex) or
                  isinstance(epochs[0], np.complex128)):
                return CDFepoch.encode_epoch16(epochs, iso_8601)
            else:
                print('Bad input')
                return None
        else:
            print('Bad input')
            return None