Use object instead of deprecated np.object

main
Aurélien Geron 2022-09-22 23:29:04 +12:00
parent 79ce441212
commit c9e108fde1
1 changed files with 2 additions and 2 deletions

View File

@ -1793,7 +1793,7 @@
"metadata": {},
"outputs": [],
"source": [
"X_valid_predictions = np.empty((len(X_valid), len(estimators)), dtype=np.object)\n",
"X_valid_predictions = np.empty((len(X_valid), len(estimators)), dtype=object)\n",
"\n",
"for index, estimator in enumerate(estimators):\n",
" X_valid_predictions[:, index] = estimator.predict(X_valid)"
@ -1887,7 +1887,7 @@
"metadata": {},
"outputs": [],
"source": [
"X_test_predictions = np.empty((len(X_test), len(estimators)), dtype=np.object)\n",
"X_test_predictions = np.empty((len(X_test), len(estimators)), dtype=object)\n",
"\n",
"for index, estimator in enumerate(estimators):\n",
" X_test_predictions[:, index] = estimator.predict(X_test)"