Module Expr Str Import alias ImportFrom alias FunctionDef arguments args NameParam NameParam defaults Str body Expr Str Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad Assign NameStore ListComp SubscriptLoad AttributeLoad NameLoad attr Index Num comprehension NameStore NameLoad Assign NameStore AttributeLoad SubscriptLoad NameLoad Index Num attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad keyword NameLoad If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd ListLoad Num SubscriptLoad NameLoad Slice Num orelse Expr Call AttributeLoad NameLoad attr Assign NameStore BinOpAdd ListLoad Num SubscriptLoad NameLoad Slice Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr For NameStore Call NameLoad NameLoad body Expr Call NameLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad ExtSlice Slice Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str Assign NameStore ListComp Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad comprehension NameStore Call NameLoad Call NameLoad NameLoad Return Call NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore BinOpFloorDiv SubscriptLoad AttributeLoad NameLoad attr Index Num BinOpMult NameLoad NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad For NameStore Call NameLoad NameLoad body For NameStore Call NameLoad NameLoad body Assign NameStore BinOpAdd BinOpAdd BinOpMult BinOpMult NameLoad NameLoad NameLoad BinOpMult NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad decorator_list NameLoad
N/A N/A 
Filename: gridtools.py

Authors: Pablo Winant

Implements cartesian products and regular cartesian grids.
 N/A numpy numba njit cartesian N/A N/A nodes order N/A C N/A N/A Cartesian product of a list of arrays

    Parameters:
    -----------
    nodes: (list of 1d-arrays)
    order: ('C' or 'F') order in which the product is enumerated

    Returns:
    --------
    out: (2d-array) each line corresponds to one point of the product space
     N/A nodes N/A N/A N/A numpy array e N/A e nodes N/A shapes N/A N/A N/A e shape N/A 0 N/A e nodes N/A dtype N/A N/A nodes N/A 0 dtype N/A n N/A len nodes N/A l N/A N/A numpy prod shapes N/A out N/A N/A numpy zeros N/A l n dtype dtype N/A N/A order C N/A N/A repetitions N/A N/A numpy cumprod N/A N/A 1 N/A shapes N/A -1 N/A N/A N/A N/A shapes reverse N/A sh N/A N/A 1 N/A shapes N/A -1 N/A repetitions N/A N/A numpy cumprod sh N/A repetitions N/A N/A repetitions tolist N/A N/A N/A repetitions reverse N/A i N/A range n N/A N/A N/A _repeat_1d N/A nodes N/A i N/A repetitions N/A i N/A out N/A N/A N/A i N/A out N/A mlinspace N/A N/A a b nums order N/A C N/A N/A Constructs a regular cartesian grid

    Parameters:
    -----------
    a: (1d-array) lower bounds in each dimension
    b: (1d-array) upper bounds in each dimension
    nums: (1d-array) number of nodes along each dimension
    order: ('C' or 'F') order in which the product is enumerated

    Returns:
    --------
    out: (2d-array) each line corresponds to one point of the product space
     N/A a N/A N/A numpy array a dtype float64 N/A b N/A N/A numpy array b dtype float64 N/A nums N/A N/A numpy array nums dtype int64 N/A nodes N/A N/A N/A numpy linspace N/A a N/A i N/A b N/A i N/A nums N/A i N/A i N/A range N/A len nums N/A N/A cartesian nodes order order N/A _repeat_1d N/A N/A x K out N/A N/A N/A Repeats each element of a vector many times and repeats the whole result many times

    Parameters
    ----------

    x: (1d array)       vector to be repeated
    K: (int)            number of times each element of x is repeated (inner iterations)
    out: (1d array)     placeholder for the result

    Returns
    -------
    None
     N/A N N/A N/A x shape N/A 0 N/A L N/A N/A N/A out shape N/A 0 N/A K N N/A n N/A range N N/A N/A val N/A x N/A n N/A k N/A range K N/A N/A l N/A range L N/A N/A ind N/A N/A N/A N/A k N L N/A n L l N/A N/A out N/A ind val N/A njit