Closed kmdalton closed 8 months ago
This PR just optimizes rs.utils.weighted_pearsonr by replacing sequential multiplication and summation with np.einsum. This allows numpy to calculate r faster and with less memory.
rs.utils.weighted_pearsonr
np.einsum
This PR just optimizes
rs.utils.weighted_pearsonr
by replacing sequential multiplication and summation withnp.einsum
. This allows numpy to calculate r faster and with less memory.