Repeat

Functions for repeating arrays of varying dimensions.

exa.math.misc.repeat.repeat_count(array, n)[source]

Repeat each element of an array n times.

exa.math.misc.repeat.repeat_counts_f8_1d(array, counts)[source]

Repeat each element of an array n times (with variable n).

exa.math.misc.repeat.repeat_counts_f8_2d(array, counts)[source]

Repeat each element of an array n times (with variable n).

Summations

Fast algorithms for various types of (commonly used) summations.

exa.math.misc.summation.sum_product_pair(x, y)[source]

Sum each pair of elements coming from product().

exa.math.misc.summation.sum_product_pair_f8(x, y)[source]

Sum each pair of elements from two 1 dimensional arrays.

x = np.array([1., 2., 3.])
y = np.array([4., 1., 2.])
sum_product_pair_f8(x, y)    # array([5.0, 2.0, 3.0, 6.0, 3.0, 4.0, 7.0, 4.0, 5.0])