Instantiates an irregular DateTimeIndex.
    
    Parameters
    ----------
        timestamps : a Pandas DateTimeIndex, or an array of strings, longs (nanos from epoch), Pandas
            Timestamps
        sc : SparkContext

def irregular(timestamps, sc):
    """
    Instantiates an irregular DateTimeIndex.
    
    Parameters
    ----------
        timestamps : a Pandas DateTimeIndex, or an array of strings, longs (nanos from epoch), Pandas
            Timestamps
        sc : SparkContext
    """
    dtmodule = sc._jvm.com.cloudera.sparkts.__getattr__('DateTimeIndex$').__getattr__('MODULE$')
    arr = sc._gateway.new_array(sc._jvm.long, len(timestamps))
    for i in xrange(len(timestamps)):
        arr[i] = datetime_to_nanos(timestamps[i])
    return DateTimeIndex(dtmodule.irregular(arr))