<p dir="auto">As of 0.15, roc_auc_score no longer accepts a Pandas Series for y_true, although it does accept it for y_score: you can replicate it as follows:</p>
<p dir="auto">import numpy as np<br>
from sklearn.ensemble import RandomForestClassifier<br>
import pandas as pd<br>
from sklearn.metrics import roc_auc_score</p>
<p dir="auto">DF=pd.DataFrame({"A":[1,2,3,4,5,6,7,8,9,10],"B":[1,1,1,1,0,0,0,0,0,0],"C":[1,1,1,0,0,0,0,0,0,0]})<br>
RF=RandomForestClassifier()<br>
RF.fit(DF[['A','B']],DF["C"])<br>
DF['predict_proba']=RF.predict_proba(DF[['A','B']])[:,1]<br>
roc_auc_score(DF["C"],DF["predict_proba"])</p>
<p dir="auto">This will return the error "Expected array-like (array or non-string sequence), got 0    1"<br>
roc_auc_score(np.array(DF["C"]),DF["predict_proba"]) works correctly.</p>
<p dir="auto">As indicated by the title, the roc_auc_score metric is no longer accepting a Pandas Series as an argument for y_true as of .15, although it will accept it at y_score: you can replicate this bug as follows:</p>
<p dir="auto">import numpy as np<br>
from sklearn.ensemble import RandomForestClassifier<br>
from sklearn.metrics import roc_auc_score<br>
import pandas as pd<br>
DF=pd.DataFrame({"A":[1,2,3,4,5,6,7,8,9,10],"B":[1,1,1,1,0,0,0,0,0,0],"C":[1,1,1,0,0,0,0,0,0,0]})<br>
RF=RandomForestClassifier()<br>
RF.fit(DF[['A','B']],DF["C"])<br>
DF['predict_proba']=RF.predict_proba(DF[['A','B']])[:,1]<br>
roc_auc_score(DF["C"],DF["predict_proba"])</p>
<p dir="auto">This will return "ValueError: Expected array-like (array or non-string sequence), got 0    1"</p>
<p dir="auto">However, roc_auc_score(np.array(DF["C"]),DF["predict_proba"]) will work fine.</p>