polars-ta 0.4.7__py3-none-any.whl → 0.5.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
  import talib as _ta
3
3
  from polars import Expr, struct, Struct, Field, Float64
4
4
 
5
- from polars_ta.utils.numba_ import batches_i1_o1, batches_i1_o2, batches_i2_o1, batches_i2_o2
5
+ from polars_ta.utils.numba_ import batches_i1_o1, batches_i1_o2, batches_i2_o1, batches_i2_o2, struct_to_numpy
6
6
 
7
7
 
8
8
  def HT_DCPERIOD(close: Expr) -> Expr: # ['real']
@@ -85,7 +85,7 @@ def ADD(high: Expr, low: Expr) -> Expr: # ['real']
85
85
  Outputs:
86
86
  real
87
87
  """
88
- return struct([high, low]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(2)], _ta.ADD))
88
+ return struct([high, low]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 2, dtype=float), _ta.ADD))
89
89
 
90
90
 
91
91
  def DIV(high: Expr, low: Expr) -> Expr: # ['real']
@@ -99,7 +99,7 @@ def DIV(high: Expr, low: Expr) -> Expr: # ['real']
99
99
  Outputs:
100
100
  real
101
101
  """
102
- return struct([high, low]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(2)], _ta.DIV))
102
+ return struct([high, low]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 2, dtype=float), _ta.DIV))
103
103
 
104
104
 
105
105
  def MAX(close: Expr, timeperiod: int = 30) -> Expr: # ['real']
@@ -207,7 +207,7 @@ def MULT(high: Expr, low: Expr) -> Expr: # ['real']
207
207
  Outputs:
208
208
  real
209
209
  """
210
- return struct([high, low]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(2)], _ta.MULT))
210
+ return struct([high, low]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 2, dtype=float), _ta.MULT))
211
211
 
212
212
 
213
213
  def SUB(high: Expr, low: Expr) -> Expr: # ['real']
@@ -221,7 +221,7 @@ def SUB(high: Expr, low: Expr) -> Expr: # ['real']
221
221
  Outputs:
222
222
  real
223
223
  """
224
- return struct([high, low]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(2)], _ta.SUB))
224
+ return struct([high, low]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 2, dtype=float), _ta.SUB))
225
225
 
226
226
 
227
227
  def SUM(close: Expr, timeperiod: int = 30) -> Expr: # ['real']
@@ -446,7 +446,7 @@ def ADX(high: Expr, low: Expr, close: Expr, timeperiod: int = 14) -> Expr: # ['
446
446
  Outputs:
447
447
  real
448
448
  """
449
- return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(3)], _ta.ADX, timeperiod))
449
+ return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 3, dtype=float), _ta.ADX, timeperiod))
450
450
 
451
451
 
452
452
  def ADXR(high: Expr, low: Expr, close: Expr, timeperiod: int = 14) -> Expr: # ['real']
@@ -461,7 +461,7 @@ def ADXR(high: Expr, low: Expr, close: Expr, timeperiod: int = 14) -> Expr: # [
461
461
  Outputs:
462
462
  real
463
463
  """
464
- return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(3)], _ta.ADXR, timeperiod))
464
+ return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 3, dtype=float), _ta.ADXR, timeperiod))
465
465
 
466
466
 
467
467
  def APO(close: Expr, fastperiod: int = 12, slowperiod: int = 26, matype: int = 0) -> Expr: # ['real']
@@ -495,7 +495,7 @@ def AROON(high: Expr, low: Expr, timeperiod: int = 14) -> Expr: # ['aroondown',
495
495
  aroonup
496
496
  """
497
497
  dtype = Struct([Field(f"column_{i}", Float64) for i in range(2)])
498
- return struct([high, low]).map_batches(lambda xx: batches_i2_o2([xx.struct[i].to_numpy().astype(float) for i in range(2)], _ta.AROON, timeperiod), return_dtype=dtype)
498
+ return struct([high, low]).map_batches(lambda xx: batches_i2_o2(struct_to_numpy(xx, 2, dtype=float), _ta.AROON, timeperiod), return_dtype=dtype)
499
499
 
500
500
 
501
501
  def AROONOSC(high: Expr, low: Expr, timeperiod: int = 14) -> Expr: # ['real']
@@ -510,7 +510,7 @@ def AROONOSC(high: Expr, low: Expr, timeperiod: int = 14) -> Expr: # ['real']
510
510
  Outputs:
511
511
  real
512
512
  """
513
- return struct([high, low]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(2)], _ta.AROONOSC, timeperiod))
513
+ return struct([high, low]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 2, dtype=float), _ta.AROONOSC, timeperiod))
514
514
 
515
515
 
516
516
  def BOP(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['real']
@@ -523,7 +523,7 @@ def BOP(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['real']
523
523
  Outputs:
524
524
  real
525
525
  """
526
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.BOP))
526
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.BOP))
527
527
 
528
528
 
529
529
  def CCI(high: Expr, low: Expr, close: Expr, timeperiod: int = 14) -> Expr: # ['real']
@@ -538,7 +538,7 @@ def CCI(high: Expr, low: Expr, close: Expr, timeperiod: int = 14) -> Expr: # ['
538
538
  Outputs:
539
539
  real
540
540
  """
541
- return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(3)], _ta.CCI, timeperiod))
541
+ return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 3, dtype=float), _ta.CCI, timeperiod))
542
542
 
543
543
 
544
544
  def CMO(close: Expr, timeperiod: int = 14) -> Expr: # ['real']
@@ -568,7 +568,7 @@ def DX(high: Expr, low: Expr, close: Expr, timeperiod: int = 14) -> Expr: # ['r
568
568
  Outputs:
569
569
  real
570
570
  """
571
- return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(3)], _ta.DX, timeperiod))
571
+ return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 3, dtype=float), _ta.DX, timeperiod))
572
572
 
573
573
 
574
574
  def MACD(close: Expr, fastperiod: int = 12, slowperiod: int = 26, signalperiod: int = 9) -> Expr: # ['macd', 'macdsignal', 'macdhist']
@@ -644,7 +644,7 @@ def MFI(high: Expr, low: Expr, close: Expr, volume: Expr, timeperiod: int = 14)
644
644
  Outputs:
645
645
  real
646
646
  """
647
- return struct([high, low, close, volume]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.MFI, timeperiod))
647
+ return struct([high, low, close, volume]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.MFI, timeperiod))
648
648
 
649
649
 
650
650
  def MINUS_DI(high: Expr, low: Expr, close: Expr, timeperiod: int = 14) -> Expr: # ['real']
@@ -659,7 +659,7 @@ def MINUS_DI(high: Expr, low: Expr, close: Expr, timeperiod: int = 14) -> Expr:
659
659
  Outputs:
660
660
  real
661
661
  """
662
- return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(3)], _ta.MINUS_DI, timeperiod))
662
+ return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 3, dtype=float), _ta.MINUS_DI, timeperiod))
663
663
 
664
664
 
665
665
  def MINUS_DM(high: Expr, low: Expr, timeperiod: int = 14) -> Expr: # ['real']
@@ -674,7 +674,7 @@ def MINUS_DM(high: Expr, low: Expr, timeperiod: int = 14) -> Expr: # ['real']
674
674
  Outputs:
675
675
  real
676
676
  """
677
- return struct([high, low]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(2)], _ta.MINUS_DM, timeperiod))
677
+ return struct([high, low]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 2, dtype=float), _ta.MINUS_DM, timeperiod))
678
678
 
679
679
 
680
680
  def MOM(close: Expr, timeperiod: int = 10) -> Expr: # ['real']
@@ -704,7 +704,7 @@ def PLUS_DI(high: Expr, low: Expr, close: Expr, timeperiod: int = 14) -> Expr:
704
704
  Outputs:
705
705
  real
706
706
  """
707
- return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(3)], _ta.PLUS_DI, timeperiod))
707
+ return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 3, dtype=float), _ta.PLUS_DI, timeperiod))
708
708
 
709
709
 
710
710
  def PLUS_DM(high: Expr, low: Expr, timeperiod: int = 14) -> Expr: # ['real']
@@ -719,7 +719,7 @@ def PLUS_DM(high: Expr, low: Expr, timeperiod: int = 14) -> Expr: # ['real']
719
719
  Outputs:
720
720
  real
721
721
  """
722
- return struct([high, low]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(2)], _ta.PLUS_DM, timeperiod))
722
+ return struct([high, low]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 2, dtype=float), _ta.PLUS_DM, timeperiod))
723
723
 
724
724
 
725
725
  def PPO(close: Expr, fastperiod: int = 12, slowperiod: int = 26, matype: int = 0) -> Expr: # ['real']
@@ -832,7 +832,7 @@ def STOCH(high: Expr, low: Expr, close: Expr, fastk_period: int = 5, slowk_perio
832
832
  slowd
833
833
  """
834
834
  dtype = Struct([Field(f"column_{i}", Float64) for i in range(2)])
835
- return struct([high, low, close]).map_batches(lambda xx: batches_i2_o2([xx.struct[i].to_numpy().astype(float) for i in range(3)], _ta.STOCH, fastk_period, slowk_period, slowk_matype, slowd_period, slowd_matype), return_dtype=dtype)
835
+ return struct([high, low, close]).map_batches(lambda xx: batches_i2_o2(struct_to_numpy(xx, 3, dtype=float), _ta.STOCH, fastk_period, slowk_period, slowk_matype, slowd_period, slowd_matype), return_dtype=dtype)
836
836
 
837
837
 
838
838
  def STOCHF(high: Expr, low: Expr, close: Expr, fastk_period: int = 5, fastd_period: int = 3, fastd_matype: int = 0) -> Expr: # ['fastk', 'fastd']
@@ -851,7 +851,7 @@ def STOCHF(high: Expr, low: Expr, close: Expr, fastk_period: int = 5, fastd_peri
851
851
  fastd
852
852
  """
853
853
  dtype = Struct([Field(f"column_{i}", Float64) for i in range(2)])
854
- return struct([high, low, close]).map_batches(lambda xx: batches_i2_o2([xx.struct[i].to_numpy().astype(float) for i in range(3)], _ta.STOCHF, fastk_period, fastd_period, fastd_matype), return_dtype=dtype)
854
+ return struct([high, low, close]).map_batches(lambda xx: batches_i2_o2(struct_to_numpy(xx, 3, dtype=float), _ta.STOCHF, fastk_period, fastd_period, fastd_matype), return_dtype=dtype)
855
855
 
856
856
 
857
857
  def STOCHRSI(close: Expr, timeperiod: int = 14, fastk_period: int = 5, fastd_period: int = 3, fastd_matype: int = 0) -> Expr: # ['fastk', 'fastd']
@@ -903,7 +903,7 @@ def ULTOSC(high: Expr, low: Expr, close: Expr, timeperiod1: int = 7, timeperiod2
903
903
  Outputs:
904
904
  real
905
905
  """
906
- return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(3)], _ta.ULTOSC, timeperiod1, timeperiod2, timeperiod3))
906
+ return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 3, dtype=float), _ta.ULTOSC, timeperiod1, timeperiod2, timeperiod3))
907
907
 
908
908
 
909
909
  def WILLR(high: Expr, low: Expr, close: Expr, timeperiod: int = 14) -> Expr: # ['real']
@@ -918,7 +918,7 @@ def WILLR(high: Expr, low: Expr, close: Expr, timeperiod: int = 14) -> Expr: #
918
918
  Outputs:
919
919
  real
920
920
  """
921
- return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(3)], _ta.WILLR, timeperiod))
921
+ return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 3, dtype=float), _ta.WILLR, timeperiod))
922
922
 
923
923
 
924
924
  def BBANDS(close: Expr, timeperiod: int = 5, nbdevup: float = 2.0, nbdevdn: float = 2.0, matype: int = 0) -> Expr: # ['upperband', 'middleband', 'lowerband']
@@ -1049,7 +1049,7 @@ def MAVP(close: Expr, periods: Expr, minperiod: int = 2, maxperiod: int = 30, ma
1049
1049
  Outputs:
1050
1050
  real
1051
1051
  """
1052
- return struct([close, periods]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(2)], _ta.MAVP, minperiod, maxperiod, matype))
1052
+ return struct([close, periods]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 2, dtype=float), _ta.MAVP, minperiod, maxperiod, matype))
1053
1053
 
1054
1054
 
1055
1055
  def MIDPOINT(close: Expr, timeperiod: int = 14) -> Expr: # ['real']
@@ -1079,7 +1079,7 @@ def MIDPRICE(high: Expr, low: Expr, timeperiod: int = 14) -> Expr: # ['real']
1079
1079
  Outputs:
1080
1080
  real
1081
1081
  """
1082
- return struct([high, low]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(2)], _ta.MIDPRICE, timeperiod))
1082
+ return struct([high, low]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 2, dtype=float), _ta.MIDPRICE, timeperiod))
1083
1083
 
1084
1084
 
1085
1085
  def SAR(high: Expr, low: Expr, acceleration: float = 0.02, maximum: float = 0.2) -> Expr: # ['real']
@@ -1095,7 +1095,7 @@ def SAR(high: Expr, low: Expr, acceleration: float = 0.02, maximum: float = 0.2)
1095
1095
  Outputs:
1096
1096
  real
1097
1097
  """
1098
- return struct([high, low]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(2)], _ta.SAR, acceleration, maximum))
1098
+ return struct([high, low]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 2, dtype=float), _ta.SAR, acceleration, maximum))
1099
1099
 
1100
1100
 
1101
1101
  def SAREXT(high: Expr, low: Expr, startvalue: float = 0.0, offsetonreverse: float = 0.0, accelerationinitlong: float = 0.02, accelerationlong: float = 0.02, accelerationmaxlong: float = 0.2, accelerationinitshort: float = 0.02, accelerationshort: float = 0.02, accelerationmaxshort: float = 0.2) -> Expr: # ['real']
@@ -1117,7 +1117,7 @@ def SAREXT(high: Expr, low: Expr, startvalue: float = 0.0, offsetonreverse: floa
1117
1117
  Outputs:
1118
1118
  real
1119
1119
  """
1120
- return struct([high, low]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(2)], _ta.SAREXT, startvalue, offsetonreverse, accelerationinitlong, accelerationlong, accelerationmaxlong, accelerationinitshort, accelerationshort, accelerationmaxshort))
1120
+ return struct([high, low]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 2, dtype=float), _ta.SAREXT, startvalue, offsetonreverse, accelerationinitlong, accelerationlong, accelerationmaxlong, accelerationinitshort, accelerationshort, accelerationmaxshort))
1121
1121
 
1122
1122
 
1123
1123
  def SMA(close: Expr, timeperiod: int = 30) -> Expr: # ['real']
@@ -1206,7 +1206,7 @@ def CDL2CROWS(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['inte
1206
1206
  Outputs:
1207
1207
  integer (values are -100, 0 or 100)
1208
1208
  """
1209
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDL2CROWS))
1209
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDL2CROWS))
1210
1210
 
1211
1211
 
1212
1212
  def CDL3BLACKCROWS(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1219,7 +1219,7 @@ def CDL3BLACKCROWS(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # [
1219
1219
  Outputs:
1220
1220
  integer (values are -100, 0 or 100)
1221
1221
  """
1222
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDL3BLACKCROWS))
1222
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDL3BLACKCROWS))
1223
1223
 
1224
1224
 
1225
1225
  def CDL3INSIDE(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1232,7 +1232,7 @@ def CDL3INSIDE(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['int
1232
1232
  Outputs:
1233
1233
  integer (values are -100, 0 or 100)
1234
1234
  """
1235
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDL3INSIDE))
1235
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDL3INSIDE))
1236
1236
 
1237
1237
 
1238
1238
  def CDL3LINESTRIKE(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1245,7 +1245,7 @@ def CDL3LINESTRIKE(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # [
1245
1245
  Outputs:
1246
1246
  integer (values are -100, 0 or 100)
1247
1247
  """
1248
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDL3LINESTRIKE))
1248
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDL3LINESTRIKE))
1249
1249
 
1250
1250
 
1251
1251
  def CDL3OUTSIDE(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1258,7 +1258,7 @@ def CDL3OUTSIDE(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['in
1258
1258
  Outputs:
1259
1259
  integer (values are -100, 0 or 100)
1260
1260
  """
1261
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDL3OUTSIDE))
1261
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDL3OUTSIDE))
1262
1262
 
1263
1263
 
1264
1264
  def CDL3STARSINSOUTH(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1271,7 +1271,7 @@ def CDL3STARSINSOUTH(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: #
1271
1271
  Outputs:
1272
1272
  integer (values are -100, 0 or 100)
1273
1273
  """
1274
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDL3STARSINSOUTH))
1274
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDL3STARSINSOUTH))
1275
1275
 
1276
1276
 
1277
1277
  def CDL3WHITESOLDIERS(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1284,7 +1284,7 @@ def CDL3WHITESOLDIERS(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr:
1284
1284
  Outputs:
1285
1285
  integer (values are -100, 0 or 100)
1286
1286
  """
1287
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDL3WHITESOLDIERS))
1287
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDL3WHITESOLDIERS))
1288
1288
 
1289
1289
 
1290
1290
  def CDLABANDONEDBABY(open: Expr, high: Expr, low: Expr, close: Expr, penetration: float = 0.3) -> Expr: # ['integer']
@@ -1299,7 +1299,7 @@ def CDLABANDONEDBABY(open: Expr, high: Expr, low: Expr, close: Expr, penetration
1299
1299
  Outputs:
1300
1300
  integer (values are -100, 0 or 100)
1301
1301
  """
1302
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLABANDONEDBABY, penetration))
1302
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLABANDONEDBABY, penetration))
1303
1303
 
1304
1304
 
1305
1305
  def CDLADVANCEBLOCK(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1312,7 +1312,7 @@ def CDLADVANCEBLOCK(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: #
1312
1312
  Outputs:
1313
1313
  integer (values are -100, 0 or 100)
1314
1314
  """
1315
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLADVANCEBLOCK))
1315
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLADVANCEBLOCK))
1316
1316
 
1317
1317
 
1318
1318
  def CDLBELTHOLD(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1325,7 +1325,7 @@ def CDLBELTHOLD(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['in
1325
1325
  Outputs:
1326
1326
  integer (values are -100, 0 or 100)
1327
1327
  """
1328
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLBELTHOLD))
1328
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLBELTHOLD))
1329
1329
 
1330
1330
 
1331
1331
  def CDLBREAKAWAY(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1338,7 +1338,7 @@ def CDLBREAKAWAY(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['i
1338
1338
  Outputs:
1339
1339
  integer (values are -100, 0 or 100)
1340
1340
  """
1341
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLBREAKAWAY))
1341
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLBREAKAWAY))
1342
1342
 
1343
1343
 
1344
1344
  def CDLCLOSINGMARUBOZU(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1351,7 +1351,7 @@ def CDLCLOSINGMARUBOZU(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr:
1351
1351
  Outputs:
1352
1352
  integer (values are -100, 0 or 100)
1353
1353
  """
1354
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLCLOSINGMARUBOZU))
1354
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLCLOSINGMARUBOZU))
1355
1355
 
1356
1356
 
1357
1357
  def CDLCONCEALBABYSWALL(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1364,7 +1364,7 @@ def CDLCONCEALBABYSWALL(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr:
1364
1364
  Outputs:
1365
1365
  integer (values are -100, 0 or 100)
1366
1366
  """
1367
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLCONCEALBABYSWALL))
1367
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLCONCEALBABYSWALL))
1368
1368
 
1369
1369
 
1370
1370
  def CDLCOUNTERATTACK(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1377,7 +1377,7 @@ def CDLCOUNTERATTACK(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: #
1377
1377
  Outputs:
1378
1378
  integer (values are -100, 0 or 100)
1379
1379
  """
1380
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLCOUNTERATTACK))
1380
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLCOUNTERATTACK))
1381
1381
 
1382
1382
 
1383
1383
  def CDLDARKCLOUDCOVER(open: Expr, high: Expr, low: Expr, close: Expr, penetration: float = 0.5) -> Expr: # ['integer']
@@ -1392,7 +1392,7 @@ def CDLDARKCLOUDCOVER(open: Expr, high: Expr, low: Expr, close: Expr, penetratio
1392
1392
  Outputs:
1393
1393
  integer (values are -100, 0 or 100)
1394
1394
  """
1395
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLDARKCLOUDCOVER, penetration))
1395
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLDARKCLOUDCOVER, penetration))
1396
1396
 
1397
1397
 
1398
1398
  def CDLDOJI(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1405,7 +1405,7 @@ def CDLDOJI(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['intege
1405
1405
  Outputs:
1406
1406
  integer (values are -100, 0 or 100)
1407
1407
  """
1408
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLDOJI))
1408
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLDOJI))
1409
1409
 
1410
1410
 
1411
1411
  def CDLDOJISTAR(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1418,7 +1418,7 @@ def CDLDOJISTAR(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['in
1418
1418
  Outputs:
1419
1419
  integer (values are -100, 0 or 100)
1420
1420
  """
1421
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLDOJISTAR))
1421
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLDOJISTAR))
1422
1422
 
1423
1423
 
1424
1424
  def CDLDRAGONFLYDOJI(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1431,7 +1431,7 @@ def CDLDRAGONFLYDOJI(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: #
1431
1431
  Outputs:
1432
1432
  integer (values are -100, 0 or 100)
1433
1433
  """
1434
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLDRAGONFLYDOJI))
1434
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLDRAGONFLYDOJI))
1435
1435
 
1436
1436
 
1437
1437
  def CDLENGULFING(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1444,7 +1444,7 @@ def CDLENGULFING(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['i
1444
1444
  Outputs:
1445
1445
  integer (values are -100, 0 or 100)
1446
1446
  """
1447
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLENGULFING))
1447
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLENGULFING))
1448
1448
 
1449
1449
 
1450
1450
  def CDLEVENINGDOJISTAR(open: Expr, high: Expr, low: Expr, close: Expr, penetration: float = 0.3) -> Expr: # ['integer']
@@ -1459,7 +1459,7 @@ def CDLEVENINGDOJISTAR(open: Expr, high: Expr, low: Expr, close: Expr, penetrati
1459
1459
  Outputs:
1460
1460
  integer (values are -100, 0 or 100)
1461
1461
  """
1462
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLEVENINGDOJISTAR, penetration))
1462
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLEVENINGDOJISTAR, penetration))
1463
1463
 
1464
1464
 
1465
1465
  def CDLEVENINGSTAR(open: Expr, high: Expr, low: Expr, close: Expr, penetration: float = 0.3) -> Expr: # ['integer']
@@ -1474,7 +1474,7 @@ def CDLEVENINGSTAR(open: Expr, high: Expr, low: Expr, close: Expr, penetration:
1474
1474
  Outputs:
1475
1475
  integer (values are -100, 0 or 100)
1476
1476
  """
1477
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLEVENINGSTAR, penetration))
1477
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLEVENINGSTAR, penetration))
1478
1478
 
1479
1479
 
1480
1480
  def CDLGAPSIDESIDEWHITE(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1487,7 +1487,7 @@ def CDLGAPSIDESIDEWHITE(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr:
1487
1487
  Outputs:
1488
1488
  integer (values are -100, 0 or 100)
1489
1489
  """
1490
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLGAPSIDESIDEWHITE))
1490
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLGAPSIDESIDEWHITE))
1491
1491
 
1492
1492
 
1493
1493
  def CDLGRAVESTONEDOJI(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1500,7 +1500,7 @@ def CDLGRAVESTONEDOJI(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr:
1500
1500
  Outputs:
1501
1501
  integer (values are -100, 0 or 100)
1502
1502
  """
1503
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLGRAVESTONEDOJI))
1503
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLGRAVESTONEDOJI))
1504
1504
 
1505
1505
 
1506
1506
  def CDLHAMMER(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1513,7 +1513,7 @@ def CDLHAMMER(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['inte
1513
1513
  Outputs:
1514
1514
  integer (values are -100, 0 or 100)
1515
1515
  """
1516
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLHAMMER))
1516
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLHAMMER))
1517
1517
 
1518
1518
 
1519
1519
  def CDLHANGINGMAN(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1526,7 +1526,7 @@ def CDLHANGINGMAN(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['
1526
1526
  Outputs:
1527
1527
  integer (values are -100, 0 or 100)
1528
1528
  """
1529
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLHANGINGMAN))
1529
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLHANGINGMAN))
1530
1530
 
1531
1531
 
1532
1532
  def CDLHARAMI(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1539,7 +1539,7 @@ def CDLHARAMI(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['inte
1539
1539
  Outputs:
1540
1540
  integer (values are -100, 0 or 100)
1541
1541
  """
1542
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLHARAMI))
1542
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLHARAMI))
1543
1543
 
1544
1544
 
1545
1545
  def CDLHARAMICROSS(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1552,7 +1552,7 @@ def CDLHARAMICROSS(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # [
1552
1552
  Outputs:
1553
1553
  integer (values are -100, 0 or 100)
1554
1554
  """
1555
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLHARAMICROSS))
1555
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLHARAMICROSS))
1556
1556
 
1557
1557
 
1558
1558
  def CDLHIGHWAVE(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1565,7 +1565,7 @@ def CDLHIGHWAVE(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['in
1565
1565
  Outputs:
1566
1566
  integer (values are -100, 0 or 100)
1567
1567
  """
1568
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLHIGHWAVE))
1568
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLHIGHWAVE))
1569
1569
 
1570
1570
 
1571
1571
  def CDLHIKKAKE(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1578,7 +1578,7 @@ def CDLHIKKAKE(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['int
1578
1578
  Outputs:
1579
1579
  integer (values are -100, 0 or 100)
1580
1580
  """
1581
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLHIKKAKE))
1581
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLHIKKAKE))
1582
1582
 
1583
1583
 
1584
1584
  def CDLHIKKAKEMOD(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1591,7 +1591,7 @@ def CDLHIKKAKEMOD(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['
1591
1591
  Outputs:
1592
1592
  integer (values are -100, 0 or 100)
1593
1593
  """
1594
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLHIKKAKEMOD))
1594
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLHIKKAKEMOD))
1595
1595
 
1596
1596
 
1597
1597
  def CDLHOMINGPIGEON(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1604,7 +1604,7 @@ def CDLHOMINGPIGEON(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: #
1604
1604
  Outputs:
1605
1605
  integer (values are -100, 0 or 100)
1606
1606
  """
1607
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLHOMINGPIGEON))
1607
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLHOMINGPIGEON))
1608
1608
 
1609
1609
 
1610
1610
  def CDLIDENTICAL3CROWS(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1617,7 +1617,7 @@ def CDLIDENTICAL3CROWS(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr:
1617
1617
  Outputs:
1618
1618
  integer (values are -100, 0 or 100)
1619
1619
  """
1620
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLIDENTICAL3CROWS))
1620
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLIDENTICAL3CROWS))
1621
1621
 
1622
1622
 
1623
1623
  def CDLINNECK(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1630,7 +1630,7 @@ def CDLINNECK(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['inte
1630
1630
  Outputs:
1631
1631
  integer (values are -100, 0 or 100)
1632
1632
  """
1633
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLINNECK))
1633
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLINNECK))
1634
1634
 
1635
1635
 
1636
1636
  def CDLINVERTEDHAMMER(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1643,7 +1643,7 @@ def CDLINVERTEDHAMMER(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr:
1643
1643
  Outputs:
1644
1644
  integer (values are -100, 0 or 100)
1645
1645
  """
1646
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLINVERTEDHAMMER))
1646
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLINVERTEDHAMMER))
1647
1647
 
1648
1648
 
1649
1649
  def CDLKICKING(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1656,7 +1656,7 @@ def CDLKICKING(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['int
1656
1656
  Outputs:
1657
1657
  integer (values are -100, 0 or 100)
1658
1658
  """
1659
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLKICKING))
1659
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLKICKING))
1660
1660
 
1661
1661
 
1662
1662
  def CDLKICKINGBYLENGTH(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1669,7 +1669,7 @@ def CDLKICKINGBYLENGTH(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr:
1669
1669
  Outputs:
1670
1670
  integer (values are -100, 0 or 100)
1671
1671
  """
1672
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLKICKINGBYLENGTH))
1672
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLKICKINGBYLENGTH))
1673
1673
 
1674
1674
 
1675
1675
  def CDLLADDERBOTTOM(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1682,7 +1682,7 @@ def CDLLADDERBOTTOM(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: #
1682
1682
  Outputs:
1683
1683
  integer (values are -100, 0 or 100)
1684
1684
  """
1685
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLLADDERBOTTOM))
1685
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLLADDERBOTTOM))
1686
1686
 
1687
1687
 
1688
1688
  def CDLLONGLEGGEDDOJI(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1695,7 +1695,7 @@ def CDLLONGLEGGEDDOJI(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr:
1695
1695
  Outputs:
1696
1696
  integer (values are -100, 0 or 100)
1697
1697
  """
1698
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLLONGLEGGEDDOJI))
1698
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLLONGLEGGEDDOJI))
1699
1699
 
1700
1700
 
1701
1701
  def CDLLONGLINE(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1708,7 +1708,7 @@ def CDLLONGLINE(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['in
1708
1708
  Outputs:
1709
1709
  integer (values are -100, 0 or 100)
1710
1710
  """
1711
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLLONGLINE))
1711
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLLONGLINE))
1712
1712
 
1713
1713
 
1714
1714
  def CDLMARUBOZU(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1721,7 +1721,7 @@ def CDLMARUBOZU(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['in
1721
1721
  Outputs:
1722
1722
  integer (values are -100, 0 or 100)
1723
1723
  """
1724
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLMARUBOZU))
1724
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLMARUBOZU))
1725
1725
 
1726
1726
 
1727
1727
  def CDLMATCHINGLOW(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1734,7 +1734,7 @@ def CDLMATCHINGLOW(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # [
1734
1734
  Outputs:
1735
1735
  integer (values are -100, 0 or 100)
1736
1736
  """
1737
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLMATCHINGLOW))
1737
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLMATCHINGLOW))
1738
1738
 
1739
1739
 
1740
1740
  def CDLMATHOLD(open: Expr, high: Expr, low: Expr, close: Expr, penetration: float = 0.5) -> Expr: # ['integer']
@@ -1749,7 +1749,7 @@ def CDLMATHOLD(open: Expr, high: Expr, low: Expr, close: Expr, penetration: floa
1749
1749
  Outputs:
1750
1750
  integer (values are -100, 0 or 100)
1751
1751
  """
1752
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLMATHOLD, penetration))
1752
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLMATHOLD, penetration))
1753
1753
 
1754
1754
 
1755
1755
  def CDLMORNINGDOJISTAR(open: Expr, high: Expr, low: Expr, close: Expr, penetration: float = 0.3) -> Expr: # ['integer']
@@ -1764,7 +1764,7 @@ def CDLMORNINGDOJISTAR(open: Expr, high: Expr, low: Expr, close: Expr, penetrati
1764
1764
  Outputs:
1765
1765
  integer (values are -100, 0 or 100)
1766
1766
  """
1767
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLMORNINGDOJISTAR, penetration))
1767
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLMORNINGDOJISTAR, penetration))
1768
1768
 
1769
1769
 
1770
1770
  def CDLMORNINGSTAR(open: Expr, high: Expr, low: Expr, close: Expr, penetration: float = 0.3) -> Expr: # ['integer']
@@ -1779,7 +1779,7 @@ def CDLMORNINGSTAR(open: Expr, high: Expr, low: Expr, close: Expr, penetration:
1779
1779
  Outputs:
1780
1780
  integer (values are -100, 0 or 100)
1781
1781
  """
1782
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLMORNINGSTAR, penetration))
1782
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLMORNINGSTAR, penetration))
1783
1783
 
1784
1784
 
1785
1785
  def CDLONNECK(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1792,7 +1792,7 @@ def CDLONNECK(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['inte
1792
1792
  Outputs:
1793
1793
  integer (values are -100, 0 or 100)
1794
1794
  """
1795
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLONNECK))
1795
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLONNECK))
1796
1796
 
1797
1797
 
1798
1798
  def CDLPIERCING(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1805,7 +1805,7 @@ def CDLPIERCING(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['in
1805
1805
  Outputs:
1806
1806
  integer (values are -100, 0 or 100)
1807
1807
  """
1808
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLPIERCING))
1808
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLPIERCING))
1809
1809
 
1810
1810
 
1811
1811
  def CDLRICKSHAWMAN(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1818,7 +1818,7 @@ def CDLRICKSHAWMAN(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # [
1818
1818
  Outputs:
1819
1819
  integer (values are -100, 0 or 100)
1820
1820
  """
1821
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLRICKSHAWMAN))
1821
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLRICKSHAWMAN))
1822
1822
 
1823
1823
 
1824
1824
  def CDLRISEFALL3METHODS(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1831,7 +1831,7 @@ def CDLRISEFALL3METHODS(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr:
1831
1831
  Outputs:
1832
1832
  integer (values are -100, 0 or 100)
1833
1833
  """
1834
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLRISEFALL3METHODS))
1834
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLRISEFALL3METHODS))
1835
1835
 
1836
1836
 
1837
1837
  def CDLSEPARATINGLINES(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1844,7 +1844,7 @@ def CDLSEPARATINGLINES(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr:
1844
1844
  Outputs:
1845
1845
  integer (values are -100, 0 or 100)
1846
1846
  """
1847
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLSEPARATINGLINES))
1847
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLSEPARATINGLINES))
1848
1848
 
1849
1849
 
1850
1850
  def CDLSHOOTINGSTAR(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1857,7 +1857,7 @@ def CDLSHOOTINGSTAR(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: #
1857
1857
  Outputs:
1858
1858
  integer (values are -100, 0 or 100)
1859
1859
  """
1860
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLSHOOTINGSTAR))
1860
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLSHOOTINGSTAR))
1861
1861
 
1862
1862
 
1863
1863
  def CDLSHORTLINE(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1870,7 +1870,7 @@ def CDLSHORTLINE(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['i
1870
1870
  Outputs:
1871
1871
  integer (values are -100, 0 or 100)
1872
1872
  """
1873
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLSHORTLINE))
1873
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLSHORTLINE))
1874
1874
 
1875
1875
 
1876
1876
  def CDLSPINNINGTOP(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1883,7 +1883,7 @@ def CDLSPINNINGTOP(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # [
1883
1883
  Outputs:
1884
1884
  integer (values are -100, 0 or 100)
1885
1885
  """
1886
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLSPINNINGTOP))
1886
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLSPINNINGTOP))
1887
1887
 
1888
1888
 
1889
1889
  def CDLSTALLEDPATTERN(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1896,7 +1896,7 @@ def CDLSTALLEDPATTERN(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr:
1896
1896
  Outputs:
1897
1897
  integer (values are -100, 0 or 100)
1898
1898
  """
1899
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLSTALLEDPATTERN))
1899
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLSTALLEDPATTERN))
1900
1900
 
1901
1901
 
1902
1902
  def CDLSTICKSANDWICH(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1909,7 +1909,7 @@ def CDLSTICKSANDWICH(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: #
1909
1909
  Outputs:
1910
1910
  integer (values are -100, 0 or 100)
1911
1911
  """
1912
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLSTICKSANDWICH))
1912
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLSTICKSANDWICH))
1913
1913
 
1914
1914
 
1915
1915
  def CDLTAKURI(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1922,7 +1922,7 @@ def CDLTAKURI(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['inte
1922
1922
  Outputs:
1923
1923
  integer (values are -100, 0 or 100)
1924
1924
  """
1925
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLTAKURI))
1925
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLTAKURI))
1926
1926
 
1927
1927
 
1928
1928
  def CDLTASUKIGAP(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1935,7 +1935,7 @@ def CDLTASUKIGAP(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['i
1935
1935
  Outputs:
1936
1936
  integer (values are -100, 0 or 100)
1937
1937
  """
1938
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLTASUKIGAP))
1938
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLTASUKIGAP))
1939
1939
 
1940
1940
 
1941
1941
  def CDLTHRUSTING(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1948,7 +1948,7 @@ def CDLTHRUSTING(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['i
1948
1948
  Outputs:
1949
1949
  integer (values are -100, 0 or 100)
1950
1950
  """
1951
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLTHRUSTING))
1951
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLTHRUSTING))
1952
1952
 
1953
1953
 
1954
1954
  def CDLTRISTAR(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1961,7 +1961,7 @@ def CDLTRISTAR(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['int
1961
1961
  Outputs:
1962
1962
  integer (values are -100, 0 or 100)
1963
1963
  """
1964
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLTRISTAR))
1964
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLTRISTAR))
1965
1965
 
1966
1966
 
1967
1967
  def CDLUNIQUE3RIVER(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1974,7 +1974,7 @@ def CDLUNIQUE3RIVER(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: #
1974
1974
  Outputs:
1975
1975
  integer (values are -100, 0 or 100)
1976
1976
  """
1977
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLUNIQUE3RIVER))
1977
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLUNIQUE3RIVER))
1978
1978
 
1979
1979
 
1980
1980
  def CDLUPSIDEGAP2CROWS(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -1987,7 +1987,7 @@ def CDLUPSIDEGAP2CROWS(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr:
1987
1987
  Outputs:
1988
1988
  integer (values are -100, 0 or 100)
1989
1989
  """
1990
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLUPSIDEGAP2CROWS))
1990
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLUPSIDEGAP2CROWS))
1991
1991
 
1992
1992
 
1993
1993
  def CDLXSIDEGAP3METHODS(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['integer']
@@ -2000,7 +2000,7 @@ def CDLXSIDEGAP3METHODS(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr:
2000
2000
  Outputs:
2001
2001
  integer (values are -100, 0 or 100)
2002
2002
  """
2003
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.CDLXSIDEGAP3METHODS))
2003
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.CDLXSIDEGAP3METHODS))
2004
2004
 
2005
2005
 
2006
2006
  def AVGPRICE(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['real']
@@ -2013,7 +2013,7 @@ def AVGPRICE(open: Expr, high: Expr, low: Expr, close: Expr) -> Expr: # ['real'
2013
2013
  Outputs:
2014
2014
  real
2015
2015
  """
2016
- return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.AVGPRICE))
2016
+ return struct([open, high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.AVGPRICE))
2017
2017
 
2018
2018
 
2019
2019
  def MEDPRICE(high: Expr, low: Expr) -> Expr: # ['real']
@@ -2026,7 +2026,7 @@ def MEDPRICE(high: Expr, low: Expr) -> Expr: # ['real']
2026
2026
  Outputs:
2027
2027
  real
2028
2028
  """
2029
- return struct([high, low]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(2)], _ta.MEDPRICE))
2029
+ return struct([high, low]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 2, dtype=float), _ta.MEDPRICE))
2030
2030
 
2031
2031
 
2032
2032
  def TYPPRICE(high: Expr, low: Expr, close: Expr) -> Expr: # ['real']
@@ -2039,7 +2039,7 @@ def TYPPRICE(high: Expr, low: Expr, close: Expr) -> Expr: # ['real']
2039
2039
  Outputs:
2040
2040
  real
2041
2041
  """
2042
- return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(3)], _ta.TYPPRICE))
2042
+ return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 3, dtype=float), _ta.TYPPRICE))
2043
2043
 
2044
2044
 
2045
2045
  def WCLPRICE(high: Expr, low: Expr, close: Expr) -> Expr: # ['real']
@@ -2052,7 +2052,7 @@ def WCLPRICE(high: Expr, low: Expr, close: Expr) -> Expr: # ['real']
2052
2052
  Outputs:
2053
2053
  real
2054
2054
  """
2055
- return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(3)], _ta.WCLPRICE))
2055
+ return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 3, dtype=float), _ta.WCLPRICE))
2056
2056
 
2057
2057
 
2058
2058
  def BETA(high: Expr, low: Expr, timeperiod: int = 5) -> Expr: # ['real']
@@ -2068,7 +2068,7 @@ def BETA(high: Expr, low: Expr, timeperiod: int = 5) -> Expr: # ['real']
2068
2068
  Outputs:
2069
2069
  real
2070
2070
  """
2071
- return struct([high, low]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(2)], _ta.BETA, timeperiod))
2071
+ return struct([high, low]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 2, dtype=float), _ta.BETA, timeperiod))
2072
2072
 
2073
2073
 
2074
2074
  def CORREL(high: Expr, low: Expr, timeperiod: int = 30) -> Expr: # ['real']
@@ -2084,7 +2084,7 @@ def CORREL(high: Expr, low: Expr, timeperiod: int = 30) -> Expr: # ['real']
2084
2084
  Outputs:
2085
2085
  real
2086
2086
  """
2087
- return struct([high, low]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(2)], _ta.CORREL, timeperiod))
2087
+ return struct([high, low]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 2, dtype=float), _ta.CORREL, timeperiod))
2088
2088
 
2089
2089
 
2090
2090
  def LINEARREG(close: Expr, timeperiod: int = 14) -> Expr: # ['real']
@@ -2206,7 +2206,7 @@ def ATR(high: Expr, low: Expr, close: Expr, timeperiod: int = 14) -> Expr: # ['
2206
2206
  Outputs:
2207
2207
  real
2208
2208
  """
2209
- return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(3)], _ta.ATR, timeperiod))
2209
+ return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 3, dtype=float), _ta.ATR, timeperiod))
2210
2210
 
2211
2211
 
2212
2212
  def NATR(high: Expr, low: Expr, close: Expr, timeperiod: int = 14) -> Expr: # ['real']
@@ -2221,7 +2221,7 @@ def NATR(high: Expr, low: Expr, close: Expr, timeperiod: int = 14) -> Expr: # [
2221
2221
  Outputs:
2222
2222
  real
2223
2223
  """
2224
- return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(3)], _ta.NATR, timeperiod))
2224
+ return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 3, dtype=float), _ta.NATR, timeperiod))
2225
2225
 
2226
2226
 
2227
2227
  def TRANGE(high: Expr, low: Expr, close: Expr) -> Expr: # ['real']
@@ -2234,7 +2234,7 @@ def TRANGE(high: Expr, low: Expr, close: Expr) -> Expr: # ['real']
2234
2234
  Outputs:
2235
2235
  real
2236
2236
  """
2237
- return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(3)], _ta.TRANGE))
2237
+ return struct([high, low, close]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 3, dtype=float), _ta.TRANGE))
2238
2238
 
2239
2239
 
2240
2240
  def AD(high: Expr, low: Expr, close: Expr, volume: Expr) -> Expr: # ['real']
@@ -2247,7 +2247,7 @@ def AD(high: Expr, low: Expr, close: Expr, volume: Expr) -> Expr: # ['real']
2247
2247
  Outputs:
2248
2248
  real
2249
2249
  """
2250
- return struct([high, low, close, volume]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.AD))
2250
+ return struct([high, low, close, volume]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.AD))
2251
2251
 
2252
2252
 
2253
2253
  def ADOSC(high: Expr, low: Expr, close: Expr, volume: Expr, fastperiod: int = 3, slowperiod: int = 10) -> Expr: # ['real']
@@ -2263,7 +2263,7 @@ def ADOSC(high: Expr, low: Expr, close: Expr, volume: Expr, fastperiod: int = 3,
2263
2263
  Outputs:
2264
2264
  real
2265
2265
  """
2266
- return struct([high, low, close, volume]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(4)], _ta.ADOSC, fastperiod, slowperiod))
2266
+ return struct([high, low, close, volume]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 4, dtype=float), _ta.ADOSC, fastperiod, slowperiod))
2267
2267
 
2268
2268
 
2269
2269
  def OBV(close: Expr, volume: Expr) -> Expr: # ['real']
@@ -2277,4 +2277,4 @@ def OBV(close: Expr, volume: Expr) -> Expr: # ['real']
2277
2277
  Outputs:
2278
2278
  real
2279
2279
  """
2280
- return struct([close, volume]).map_batches(lambda xx: batches_i2_o1([xx.struct[i].to_numpy().astype(float) for i in range(2)], _ta.OBV))
2280
+ return struct([close, volume]).map_batches(lambda xx: batches_i2_o1(struct_to_numpy(xx, 2, dtype=float), _ta.OBV))