reiinakano / scikit-plot

An intuitive library to add plotting functionality to scikit-learn objects.
MIT License
2.43k stars 285 forks source link

Make plotting functions work with array-like inputs #31

Closed reiinakano closed 7 years ago

reiinakano commented 7 years ago

Plots such as plot_roc_curve must be able to take any array-like objects. As of today, they only take numpy arrays as input, otherwise an exception is raised. This numpy array conversion must be done inside the function itself.

Example:

skplt.plot_roc_curve([0, 1], [[0.2, 0.8], [0.8, 0.2]])

does not work while

skplt.plot_roc_curve(np.array([0, 1]), np.array([[0.2, 0.8], [0.8, 0.2]]))

does

reiinakano commented 7 years ago

fixed in #32