Update version numbers across Rust, Python, and documentation files to 1.1.0. Enhance the .gitignore to include macOS dSYM files and plans directory. Introduce new dependencies in the Rust core library and update the README to reflect recent performance benchmarks and backtesting engine capabilities. Add new artifacts to the benchmarks manifest and improve documentation for the backtesting engine API.
14 lines
510 B
Rust
14 lines
510 B
Rust
use numpy::{IntoPyArray, PyArray1, PyReadonlyArray1};
|
|
use pyo3::prelude::*;
|
|
|
|
/// Hilbert Transform SineWave. Returns (sine, leadsine) where leadsine leads sine by 45°.
|
|
#[pyfunction]
|
|
#[allow(clippy::type_complexity)]
|
|
pub fn ht_sine<'py>(
|
|
py: Python<'py>,
|
|
close: PyReadonlyArray1<'py, f64>,
|
|
) -> PyResult<(Bound<'py, PyArray1<f64>>, Bound<'py, PyArray1<f64>>)> {
|
|
let (sine, lead_sine) = ferro_ta_core::cycle::ht_sine(close.as_slice()?);
|
|
Ok((sine.into_pyarray(py), lead_sine.into_pyarray(py)))
|
|
}
|