-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: all the input array dimensions except for the concatenation axis must match exactly #6
Comments
At first I suspected that the fact that I was requesting for data from 2017, hence the different tickers had different no. records. I tried to use a more recent range (2020-01-01) and now Im getting
|
configured as
|
I've tried using the default configuration and it works with no issue, so I guess it's the What are the valid date ranges per timeframe for the date? I assumed it was January 2020 if using binance? |
So after trying different values for my number training candles, I found that around 300,000 was the max and was able to download with that. But now I get the following error
Full trace:
Any suggestions? |
New evidence suggests that the issue might be with my number of ticker symbols, I will try to download, as in the example configuration, 10 tickers instead of 6. Fingers crossed Please, I think any amount of your input would be a major help |
Definitely the number of tickers, but I still thank the issue needs attention so I'll leave it open |
The error you are encountering, ValueError: all the input array dimensions for the concatenation axis must match exactly, is occurring because the arrays you are trying to concatenate using np.hstack() have different sizes along dimension 0 (i.e., different numbers of rows). In this context, this could mean that different tickers have a different number of data points (candles) in the DataFrame, causing the mismatch during concatenation. You might want to ensure that each ticker has the same number of data points before attempting to concatenate. Here's how you could modify the df_to_array method to handle this. |
I'd like to update the code but i am not very familiar to contributing to open source projects |
I'm trying to download the training data using
0_dl_trainval_data.py
. It looks like the data downloaded successfully but the pre-processing causes the error. Specificallyprice_array = np.hstack([price_array, df[df.tic == tic][['close']].values])
causes the error.The text was updated successfully, but these errors were encountered: