Skip to content

Commit 36f85a9

Browse files
author
xinshen
committed
Correct 'ValueError: Shape of passed values is (2, X), indices imply (2, Y)'
1 parent 0b05308 commit 36f85a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/analyzers/crossover.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ def analyze(self, key_indicator, key_signal, key_indicator_index,
3333
column_indexed_name = '{}_{}'.format(column, key_indicator_index)
3434
new_key_indicator.rename(columns={column: column_indexed_name}, inplace=True)
3535

36+
length = new_key_indicator.shape()
3637
crossed_indicator_name = '{}_{}'.format(crossed_signal, crossed_indicator_index)
37-
new_crossed_indicator = crossed_indicator.copy(deep=True)
38+
new_crossed_indicator = crossed_indicator[:length[1]].copy(deep=True)
3839
for column in new_crossed_indicator:
3940
column_indexed_name = '{}_{}'.format(column, crossed_indicator_index)
4041
new_crossed_indicator.rename(columns={column: column_indexed_name}, inplace=True)

0 commit comments

Comments
 (0)