Issue 1:
I was trying this code:

for _ in trange(20):
Q = qdmat.dot(dqmat.dot(Q))
csr_topn(Q, 10)
Normalizer(norm="l2", copy=False).fit_transform(Q)
steps.append(Q[select_indexes])

but get this error:

ValueError Traceback (most recent call last)
<ipython-input-5-772329bf5896> in <module>()
8 Q = qdmat.dot(dqmat.dot(Q))
9 csr_topn(Q, 10)
---> 10 Normalizer(norm="l1", copy=False).fit_transform(Q)
11 steps.append(Q[select_indexes])
12

/search/odin/tensorflow/lihengchao/anaconda3/lib/python3.6/site-packages/sklearn/base.py in fit_transform(self, X, y, **fit_params)
515 if y is None:
516 # fit method of arity 1 (unsupervised transformation)
--> 517 return self.fit(X, **fit_params).transform(X)
518 else:
519 # fit method of arity 2 (supervised transformation)

/search/odin/tensorflow/lihengchao/anaconda3/lib/python3.6/site-packages/sklearn/preprocessing/data.py in transform(self, X, y, copy)
1529 copy = copy if copy is not None else self.copy
1530 X = check_array(X, accept_sparse='csr')
-> 1531 return normalize(X, norm=self.norm, axis=1, copy=copy)
1532
1533

/search/odin/tensorflow/lihengchao/anaconda3/lib/python3.6/site-packages/sklearn/preprocessing/data.py in normalize(X, norm, axis, copy, return_norm)
1420 "or norm 'l2'")
1421 if norm == 'l1':
-> 1422 inplace_csr_row_normalize_l1(X)
1423 elif norm == 'l2':
1424 inplace_csr_row_normalize_l2(X)

sklearn/utils/sparsefuncs_fast.pyx in sklearn.utils.sparsefuncs_fast.inplace_csr_row_normalize_l1()

sklearn/utils/sparsefuncs_fast.pyx in sklearn.utils.sparsefuncs_fast._inplace_csr_row_normalize_l1()

ValueError: Buffer dtype mismatch, expected 'int' but got 'long'

the csr_matrix Q 's size is

<178726542x2000000 sparse matrix of type '<class 'numpy.float32'>'
with 1570091377 stored elements in Compressed Sparse Row format>

my os: Linux version 2.6.32-504.23.4.el6.x86_64

my python : Python 3.6.1 |Anaconda custom (64-bit)| (default, May 11 2017, 13:09:58)

my scipy: 0.19.0

my sklearn:0.19.0

Issue 2:
In scipy master (to be released as 0.14), scipy sparse matrices can now be indexed with 64 bit integers.

This means that we will probably need to use fused types for indptr and indices arrays whenever we deal with CSC or CSR datastructures in our Cython code base.

Edit: by @rth on Nov 2017 to add the status of support for 64 bit CSR indices in different parts of the code, as discussed in #2969 (comment)

preprocessing_normalize[l1-False]

preprocessing_normalize[l1-True]

preprocessing_normalize[l2-False]

preprocessing_normalize[l2-True]

decomposition_truncatedsvd[randomized]

decomposition_truncatedsvd[arpack]

decomposition_nmf[cd]

decomposition_nmf[mu]

linear_model_logisticregression[liblinear-l1]

linear_model_sgdclassifier[modified_huber-elasticnet]

linear_model_sgdclassifier[squared_hinge-l1]

linear_model_sgdclassifier[squared_hinge-l2]

linear_model_sgdclassifier[squared_hinge-elasticnet]

linear_model_sgdclassifier[perceptron-l1]

linear_model_sgdclassifier[perceptron-l2]

linear_model_sgdclassifier[perceptron-elasticnet]

linear_model_sgdregressor[squared_loss-l1]

linear_model_sgdregressor[squared_loss-l2]

linear_model_sgdregressor[squared_loss-elasticnet]

linear_model_sgdregressor[huber-l1]

linear_model_sgdregressor[huber-l2]

linear_model_sgdregressor[huber-elasticnet]

linear_model_sgdregressor[epsilon_insensitive-l1]

linear_model_sgdregressor[epsilon_insensitive-l2]

linear_model_sgdregressor[epsilon_insensitive-elasticnet]

linear_model_sgdregressor[squared_epsilon_insensitive-l1]

linear_model_sgdregressor[squared_epsilon_insensitive-l2]

linear_model_sgdregressor[squared_epsilon_insensitive-elasticnet]

linear_model_estimator[linear_model.LinearRegression]

linear_model_estimator[linear_model.ElasticNet]

linear_model_estimator[svm.LinearSVC]

linear_model_logisticregression[liblinear-l2]

linear_model_sgdclassifier[log-l1]

linear_model_sgdclassifier[log-l2]

linear_model_sgdclassifier[log-elasticnet]

linear_model_sgdclassifier[modified_huber-l1]

linear_model_sgdclassifier[modified_huber-l2]

linear_model_estimator[svm.SVC]

linear_model_estimator[tree.DecisionTreeClassifier]

linear_model_logisticregression[newton-cg-l2]

linear_model_logisticregression[lbfgs-l2]

linear_model_logisticregression[sag-l2]

linear_model_sgdclassifier[hinge-l1]

linear_model_sgdclassifier[hinge-l2]

linear_model_sgdclassifier[hinge-elasticnet]