Skip to content
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

futurewarning: the behavior of array concatenation with empty entries is deprecated #21

Open
fatalfeel opened this issue Sep 23, 2024 · 0 comments

Comments

@fatalfeel
Copy link

in python 3.12 happen, fixed as follows

avoid FutureWarning: The behavior of array concatenation with empty entries is deprecated

'''all_predicted_probs = pd.concat([all_predicted_probs, predicted_probs], ignore_index=True)
all_testing_y = pd.concat([all_testing_y, self.testing_y])'''
if all_predicted_probs.empty:
all_predicted_probs = predicted_probs.copy()
else:
all_predicted_probs = pd.concat([all_predicted_probs, predicted_probs])

if all_testing_y.empty:
all_testing_y = self.testing_y.copy()
else:
pd.concat([all_testing_y, self.testing_y])

dates.extend(self.full_df['Dates'].loc[self.pred_indices])

'''all_predicted_probs = pd.concat([all_predicted_probs, predicted_probs], ignore_index=True)
all_testing_y = pd.concat([all_testing_y, self.testing_y])'''
if all_predicted_probs.empty:
all_predicted_probs = predicted_probs.copy()
else:
all_predicted_probs = pd.concat([all_predicted_probs, predicted_probs])

if all_testing_y.empty:
all_testing_y = self.testing_y.copy()
else:
all_testing_y = pd.concat([all_testing_y, self.testing_y])

dates.extend(self.full_df['Dates'].loc[self.cv_indices])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant