Esempio n. 1
0
def do_outer_join_multi(a, b, av, bv):
    n, ak = av.shape
    _, bk = bv.shape
    result_index, rindexer, lindexer = lib.outer_join_indexer(a, b)
    result = np.empty((len(result_index), ak + bk), dtype=np.float64)
    lib.take_join_contiguous(av, bv, lindexer, rindexer, result)
    # result = np.empty((ak + bk, len(result_index)), dtype=np.float64)
    # lib.take_axis0(av, rindexer, out=result[:ak].T)
    # lib.take_axis0(bv, lindexer, out=result[ak:].T)
    return result_index, result
Esempio n. 2
0
def do_outer_join_multi(a, b, av, bv):
    n, ak = av.shape
    _, bk = bv.shape
    result_index, rindexer, lindexer = lib.outer_join_indexer(a, b)
    result = np.empty((len(result_index), ak + bk), dtype=np.float64)
    lib.take_join_contiguous(av, bv, lindexer, rindexer, result)
    # result = np.empty((ak + bk, len(result_index)), dtype=np.float64)
    # lib.take_axis0(av, rindexer, out=result[:ak].T)
    # lib.take_axis0(bv, lindexer, out=result[ak:].T)
    return result_index, result
Esempio n. 3
0
def do_outer_join(a, b, av, bv):
    result_index, aindexer, bindexer = lib.outer_join_indexer(a, b)
    result = np.empty((2, len(result_index)))
    lib.take_1d(av, aindexer, result[0])
    lib.take_1d(bv, bindexer, result[1])
    return result_index, result
Esempio n. 4
0
def do_outer_join(a, b, av, bv):
    result_index, aindexer, bindexer = lib.outer_join_indexer(a, b)
    result = np.empty((2, len(result_index)))
    lib.take_1d(av, aindexer, result[0])
    lib.take_1d(bv, bindexer, result[1])
    return result_index, result