def xcorr(self, x1: np.ndarray, x2=None, Trange=None, **kwargs) -> np.ndarray:
    '\n        Calculates the histogram of the ISIs in x1 or x1 vs x2\n\n        Parameters\n        ----------\n        x1, x2 : array_like\n            The times of the spikes emitted by the cluster(s)\n            NB must be signed int to accomodate negative times\n        Trange : array_like\n            Range of times to bin up. Defaults to [-500, +500] in ms\n\n        Returns\n        -------\n        y : np.ndarray\n            The time differences between spike times in x1 over the range\n            of times defined Trange\n        '
    if (x2 is None):
        x2 = x1.copy()
    if (Trange is None):
        Trange = np.array([(- 500), 500])
    if (type(Trange) == list):
        Trange = np.array(Trange)
    y = []
    irange = (x1[:, np.newaxis] + Trange[np.newaxis, :])
    dts = np.searchsorted(x2, irange)
    for (i, t) in enumerate(dts):
        y.extend((x2[t[0]:t[1]] - x1[i]))
    y = np.array(y, dtype=float)
    return y
Calculates the histogram of the ISIs in x1 or x1 vs x2

Parameters
----------
x1, x2 : array_like
    The times of the spikes emitted by the cluster(s)
    NB must be signed int to accomodate negative times
Trange : array_like
    Range of times to bin up. Defaults to [-500, +500] in ms

Returns
-------
y : np.ndarray
    The time differences between spike times in x1 over the range
    of times defined Trange
def xcorr(self, x1: np.ndarray, x2=None, Trange=None, **kwargs) -> np.ndarray:
    '\n        Calculates the histogram of the ISIs in x1 or x1 vs x2\n\n        Parameters\n        ----------\n        x1, x2 : array_like\n            The times of the spikes emitted by the cluster(s)\n            NB must be signed int to accomodate negative times\n        Trange : array_like\n            Range of times to bin up. Defaults to [-500, +500] in ms\n\n        Returns\n        -------\n        y : np.ndarray\n            The time differences between spike times in x1 over the range\n            of times defined Trange\n        '
    if (x2 is None):
        x2 = x1.copy()
    if (Trange is None):
        Trange = np.array([(- 500), 500])
    if (type(Trange) == list):
        Trange = np.array(Trange)
    y = []
    irange = (x1[:, np.newaxis] + Trange[np.newaxis, :])
    dts = np.searchsorted(x2, irange)
    for (i, t) in enumerate(dts):
        y.extend((x2[t[0]:t[1]] - x1[i]))
    y = np.array(y, dtype=float)
    return y