Skip to content

Commit 0d9a397

Browse files
committed
feat: func output struct
1 parent f2d304b commit 0d9a397

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "polars_talib"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

python/polars_talib/__init__.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,27 @@ def get_function_groups():
190190
return __function_groups__.copy()
191191

192192

193+
def get_functions_output_struct():
194+
"""
195+
Returns a dict with keys of function names and keys of the output struct
196+
"""
197+
return {
198+
"ht_phasor": ["inphase", "quadrature"],
199+
"ht_sine": ["sine", "leadsine"],
200+
"minmax": ["min", "max"],
201+
"minmaxindex": ["minidx", "maxidx"],
202+
"aroon": ["aroondown", "aroonup"],
203+
"macd": ["macd", "macdsignal", "macdhist"],
204+
"macdext": ["macd", "macdsignal", "macdhist"],
205+
"macdfix": ["macd", "macdsignal", "macdhist"],
206+
"stoch": ["slowk", "slowd"],
207+
"stochf": ["fastk", "fastd"],
208+
"stochrsi": ["fastk", "fastd"],
209+
"bbands": ["upperband", "middleband", "lowerband"],
210+
"mama": ["mama", "fama"],
211+
}
212+
213+
193214
@pl.api.register_expr_namespace("ta")
194215
class TAExpr:
195216
def __init__(self, expr: pl.Expr):

0 commit comments

Comments
 (0)