Relative Content

Tag Archive for numpyplotscipyanndata

How to plot anndata like matrix to grey 2d numpy array

Input data mtx: “<COOrdinate sparse matrix of dtype ‘int64’ with 357558594 stored elements and shape (30562, 96629557)>” mtx.todense()[0:2,0:8] = matrix([[4050, 24, 21, 3, 0, 3, 2, 1], [1437, 17, 17, 3, 0, 3, 2, 1]]) cspdata2d: numpy.ndarray cspdata2d.shape = (96629557, 2) cspdata2d[0:8,:] = array([[43426, 1414], [ 5496, 20015], [23193, 19957], [ 2252, 28571], [10910, 22382], […]