multiple_polynomial_terms¶
- sofia_redux.toolkit.resampling.multiple_polynomial_terms(coordinates, exponents)[source]¶
Derive polynomial terms for a coordinate set given polynomial exponents.
Raises multiple coordinates by a power and then calculates the product over all dimensions. For example, the output of an (x, y) vector with
exponent=[[2, 3]]
would be \(x^2y^3\).Note that multiple sets of exponents are expected to be provided during this operation, so the
exponents
parameter should be a 2-dimensional array. The return value will be a 2-dimensional array with the size of the first dimension equal to the number of exponent sets, and the size of the second dimension equal to the number of vector sets.- Parameters:
- coordinatesnumpy.ndarray (N, n_vectors)
Sets of vectors in N-dimensions.
- exponentsnumpy.ndarray (n_exponents, N)
Sets of exponents by which to raise the vector.
- Returns:
- numpy.ndarray of numpy.float64 (n_exponents, n_vectors)
The product of the exponentiation of the vectors.