def draw_sparse_matrix(<EOL>array_filename,<EOL>output_image,<EOL>vmax=DEFAULT_SATURATION_THRESHOLD,<EOL>max_size_matrix=DEFAULT_MAX_SIZE_MATRIX,<EOL>):
matrix = np.loadtxt(array_filename, dtype=np.int32, skiprows=<NUM_LIT:1>)<EOL>try:<EOL><INDENT>row, col, data = matrix.T<EOL><DEDENT>except ValueError:<EOL><INDENT>row, col, data = matrix<EOL><DEDENT>size = max(np.amax(row), np.amax(col)) + <NUM_LIT:1><EOL>S = sparse.coo_matrix((data, (row, col)), shape=(size, size))<EOL>if max_size_matrix <= <NUM_LIT:0>:<EOL><INDENT>binning = <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>binning = (size // max_size_matrix) + <NUM_LIT:1><EOL><DEDENT>binned_S = hcs.bin_sparse(S, subsampling_factor=binning)<EOL>dense_S = binned_S.todense()<EOL>dense_S = dense_S + dense_S.T - np.diag(np.diag(dense_S))<EOL>normed_S = hcs.normalize_dense(dense_S)<EOL>spaceless_pdf_plot_maker(normed_S, output_image, vmax=vmax)<EOL>
Draw a quick preview of a sparse matrix with automated
    binning and normalization.