def f_regression_block(fun, X, y, blocksize=None, **args):
    '\n   runs f_regression for each block separately (saves memory).\n\n   -------------------------\n   fun  : method that returns statistics,pval\n   X    : {array-like, sparse matrix}  shape = (n_samples, n_features)\n          The set of regressors that will tested sequentially.\n   y    : array of shape(n_samples).\n          The data matrix\n   blocksize    : number of SNPs per block\n   '
    if (blocksize == None):
        return fun(X, y, **args)
    idx_start = 0
    idx_stop = int(blocksize)
    pval = np.zeros(X.shape[1])
    stats = np.zeros(X.shape[1])
    while (idx_start < X.shape[1]):
        (stats[idx_start:idx_stop], pval[idx_start:idx_stop]) = fun(X[:, idx_start:idx_stop], y, **args)
        idx_start = idx_stop
        idx_stop += blocksize
        if (idx_stop > X.shape[1]):
            idx_stop = X.shape[1]
    return (stats, pval)
runs f_regression for each block separately (saves memory).

-------------------------
fun  : method that returns statistics,pval
X    : {array-like, sparse matrix}  shape = (n_samples, n_features)
       The set of regressors that will tested sequentially.
y    : array of shape(n_samples).
       The data matrix
blocksize    : number of SNPs per block
def f_regression_block(fun, X, y, blocksize=None, **args):
    '\n   runs f_regression for each block separately (saves memory).\n\n   -------------------------\n   fun  : method that returns statistics,pval\n   X    : {array-like, sparse matrix}  shape = (n_samples, n_features)\n          The set of regressors that will tested sequentially.\n   y    : array of shape(n_samples).\n          The data matrix\n   blocksize    : number of SNPs per block\n   '
    if (blocksize == None):
        return fun(X, y, **args)
    idx_start = 0
    idx_stop = int(blocksize)
    pval = np.zeros(X.shape[1])
    stats = np.zeros(X.shape[1])
    while (idx_start < X.shape[1]):
        (stats[idx_start:idx_stop], pval[idx_start:idx_stop]) = fun(X[:, idx_start:idx_stop], y, **args)
        idx_start = idx_stop
        idx_stop += blocksize
        if (idx_stop > X.shape[1]):
            idx_stop = X.shape[1]
    return (stats, pval)