pymks/tools.py
def _get_ticks_params(l):
    """Get tick locations and labels for spatial correlation plots.

    >>> l = 4
    >>> result = ([0, 1, 2, 3, 4], [-2, -1, 0, 1, 2])
    >>> assert result == _get_ticks_params(l)

    Args:
        l: shape of array along the axis
    """
    segments = np.roll(np.arange(4, 7, dtype=int), 1, 0)
    m = segments[np.argmin(l % segments)]
    n = max((l + 1) / m, 1)
    tick_loc = range(0, l + n, n)
    tick_labels = range(- (l - 1) / 2, (l + 1) / 2 + n, n)
    return tick_loc, tick_labels
Get tick locations and labels for spatial correlation plots.

    >>> l = 4
    >>> result = ([0, 1, 2, 3, 4], [-2, -1, 0, 1, 2])
    >>> assert result == _get_ticks_params(l)

    Args:
        l: shape of array along the axis
    
Get tick locations and labels for spatial correlation plots.
Get tick locations and labels for spatial correlation plots .
def _get_ticks_params(l):
    segments = np.roll(np.arange(4, 7, dtype=int), 1, 0)
    m = segments[np.argmin(l % segments)]
    n = max((l + 1) / m, 1)
    tick_loc = range(0, l + n, n)
    tick_labels = range(- (l - 1) / 2, (l + 1) / 2 + n, n)
    return tick_loc, tick_labels
def _get_ticks_params ( l ) : segments = np . roll ( np . arange ( 4 , 7 , dtype = int ) , 1 , 0 ) m = segments [ np . argmin ( l % segments ) ] n = max ( ( l + 1 ) / m , 1 ) tick_loc = range ( 0 , l + n , n ) tick_labels = range ( - ( l - 1 ) / 2 , ( l + 1 ) / 2 + n , n ) return tick_loc , tick_labels
Get tick locations and labels for spatial correlation plots.
Get tick locations and labels for spatial correlation plots .
"""Get tick locations and labels for spatial correlation plots.

    >>> l = 4
    >>> result = ([0, 1, 2, 3, 4], [-2, -1, 0, 1, 2])
    >>> assert result == _get_ticks_params(l)

    Args:
        l: shape of array along the axis
    """
l
shape of array along the axis
shape of array along the axis