" Input is a {}x{} matrix."
.format(X.shape[0], X.shape[1]))
if sample_weight.shape[0] > 0 and sample_weight.shape[0] != X.shape[0]:
raise ValueError("sample_weight and X have incompatible shapes: "
"%r vs %r\n"
"Note: Sparse matrices cannot be indexed w/"
After Change
"boolean masks (use `indices=True` in CV)."
% (sample_weight.shape, X.shape))
kernel = "precomputed" if callable(self.kernel) else self.kernel
if kernel == "precomputed":
// unused but needs to be a float for cython code that ignores
// it anyway
self._gamma = 0.
elif isinstance(self.gamma, str):
if self.gamma == "scale":
// var = E[X^2] - E[X]^2 if sparse
X_var = ((X.multiply(X)).mean() - (X.mean()) ** 2