hey all … i am dealing with a typing error that i really don’t understand why its happening … i have tried to change the typing and also remove default values but no matter what i do … i always get the same error … anyone have any ideas
TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Cannot unify PriceTuple(float64 x 5) and PriceTuple(float64, array(float64, 1d, F), array(float64, 1d, F), array(float64, 1d, F), array(float64, 1d, F)) for 'prices.4', defined at e:\coding\backtesters\quantfreedom\quantfreedom\nb\simulate.py (191)
File "..\quantfreedom\nb\simulate.py", line 191:
def backtest_df_only_nb(
# Process Order nb
account_state, order_result = process_order_nb(
^
During: typing of assignment at e:\coding\backtesters\quantfreedom\quantfreedom\nb\simulate.py (191)
File "..\quantfreedom\nb\simulate.py", line 191:
def backtest_df_only_nb(
# Process Order nb
account_state, order_result = process_order_nb(
class PriceTuple(NamedTuple):
# PossibleArray = Union[np.ndarray, int, float, bool]
entry: float
open: PossibleArray
high: PossibleArray
low: PossibleArray
close: PossibleArray
Here is some info from the debugger
prices := PriceTuple(float64, array(float64, 1d, F), array(float64, 1d, F), array(float64, 1d, F), array(float64, 1d, F)),
prices.1 := PriceTuple(float64, array(float64, 1d, F), array(float64, 1d, F), array(float64, 1d, F), array(float64, 1d, F)),
prices.2 := PriceTuple(float64 x 5),
prices.3 := PriceTuple(float64 x 5),
prices.4 := PriceTuple(float64 x 5),
here is the link to the actual code QuantFreedom/simulate.py at 7267b4c38f28e1d4e6e1a975cd481ed55d887394 · QuantFreedom1022/QuantFreedom · GitHub