def numba_csgraph(csr, node_props=None):
if node_props is None:
node_props = np.broadcast_to(1., csr.shape[0])
node_props.flags.writeable = True
return CSGraph(csr.indptr, csr.indices, csr.data,
np.array(csr.shape, dtype=np.int32), node_props)
评论列表
文章目录