pub fn pearsonr_py(
py: Python<'_>,
x: &Bound<'_, PyArray1<f64>>,
y: &Bound<'_, PyArray1<f64>>,
alternative: &str,
) -> PyResult<Py<PyAny>>Expand description
Pearson correlation coefficient with significance test.
Calculates the Pearson correlation coefficient and tests for non-correlation.
Parameters: x: First array of observations y: Second array of observations (same length as x) alternative: Type of test: “two-sided” (default), “less”, or “greater”
Returns: Dictionary containing: - correlation: Pearson correlation coefficient (r) - pvalue: P-value for testing non-correlation