pymks/stats.py
def _Fkernel_shape(X_, periodic_axes):
    """
    Returns the shape of the kernel in Fourier space with non-periodic padding.

    Args:
        `X_`: The discretized microstructure function, an
            `(n_samples, n_x, ..., n_states)` shaped array
            where `n_samples` is the number of samples, `n_x` is thes
            patial discretization, and n_states is the number of local states.
        periodic_axes: the axes of the array that are periodic

    Returns:
        shape of the new Fkernel array

    Example

    >>> Nx = Ny = 5
    >>> X_ = np.zeros((1, Nx, Ny, 1))
    >>> periodic_axes = [1]
    >>> assert (_Fkernel_shape(X_,
    ...                        periodic_axes=periodic_axes) == [8, 5]).all()
    """
    axes = np.arange(len(X_.shape) - 2) + 1
    a = np.ones(len(axes), dtype=float) * 1.75
    a[list(periodic_axes)] = 1
    return (np.array(X_.shape)[axes] * a).astype(int)

    Returns the shape of the kernel in Fourier space with non-periodic padding.

    Args:
        `X_`: The discretized microstructure function, an
            `(n_samples, n_x, ..., n_states)` shaped array
            where `n_samples` is the number of samples, `n_x` is thes
            patial discretization, and n_states is the number of local states.
        periodic_axes: the axes of the array that are periodic

    Returns:
        shape of the new Fkernel array

    Example

    >>> Nx = Ny = 5
    >>> X_ = np.zeros((1, Nx, Ny, 1))
    >>> periodic_axes = [1]
    >>> assert (_Fkernel_shape(X_,
    ...                        periodic_axes=periodic_axes) == [8, 5]).all()
    
Returns the shape of the kernel in Fourier space with non-periodic padding.
Returns the shape of the kernel in Fourier space with non - periodic padding .
def _Fkernel_shape(X_, periodic_axes):
    axes = np.arange(len(X_.shape) - 2) + 1
    a = np.ones(len(axes), dtype=float) * 1.75
    a[list(periodic_axes)] = 1
    return (np.array(X_.shape)[axes] * a).astype(int)
def _Fkernel_shape ( X_ , periodic_axes ) : axes = np . arange ( len ( X_ . shape ) - 2 ) + 1 a = np . ones ( len ( axes ) , dtype = float ) * 1.75 a [ list ( periodic_axes ) ] = 1 return ( np . array ( X_ . shape ) [ axes ] * a ) . astype ( int )
Returns the shape of the kernel in Fourier space with non-periodic padding.
Returns the shape of the kernel in Fourier space with non - periodic padding .
"""
    Returns the shape of the kernel in Fourier space with non-periodic padding.

    Args:
        `X_`: The discretized microstructure function, an
            `(n_samples, n_x, ..., n_states)` shaped array
            where `n_samples` is the number of samples, `n_x` is thes
            patial discretization, and n_states is the number of local states.
        periodic_axes: the axes of the array that are periodic

    Returns:
        shape of the new Fkernel array

    Example

    >>> Nx = Ny = 5
    >>> X_ = np.zeros((1, Nx, Ny, 1))
    >>> periodic_axes = [1]
    >>> assert (_Fkernel_shape(X_,
    ...                        periodic_axes=periodic_axes) == [8, 5]).all()
    """
shape of the new Fkernel array
shape of the new Fkernel array
X_
periodic_axes
the axes of the array that are periodic
the axes of the array that are periodic
`X_`
The discretized microstructure function, an
`(n_samples, n_x, ..., n_states)` shaped array
where `n_samples` is the number of samples, `n_x` is thes
patial discretization, and n_states is the number of local states.
The discretized microstructure function an ` ( n_samples n_x ... n_states ) ` shaped array where ` n_samples ` is the number of samples ` n_x ` is thes patial discretization and n_states is the number of local states .