scikit-learn/scikit-learn — pull request #3690 by queqichao (2014-09-22 22:22:10+00:00)
Title: + Fix the bug of calling len when using sparse matrix for fit_params in ...

When using sparse matrix in fit_params, calling len(v) will raise error because the __len__ of sparse matrix is defined as
````
def __len__(self):
# return self.getnnz()
raise TypeError("sparse matrix length is ambiguous; use getnnz()"
" or shape[0]")
````
So I added extra cases to deal with sparse matrix in fit_params.