Python Forum

Full Version: Histogram and text file.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have such a text file:
breast-cancer
I want to create a histogram and any other graph. Bu I have a problem. I wrote this:
import matplotlib.pyplot as plt
import numpy as np
from sklearn.datasets import load_svmlight_file
X, y = load_svmlight_file('breast-cancer.txt')
plt.hist(X,y)
And I get:
Error:
ValueError: `bins` must increase monotonically, when an array