@@ -413,9 +413,10 @@ def block_edges(self, block_id):
413413 The edge ids.
414414 """
415415 layer0_size = self ._layer_offsets [block_id + 1 ] - self ._layer_offsets [block_id ]
416- rst = _CAPI_NodeFlowGetBlockAdj (self ._graph ._handle , "coo" , layer0_size ,
417- self ._layer_offsets [block_id + 1 ],
418- self ._layer_offsets [block_id + 2 ])
416+ rst = _CAPI_NodeFlowGetBlockAdj (self ._graph ._handle , "coo" ,
417+ int (layer0_size ),
418+ int (self ._layer_offsets [block_id + 1 ]),
419+ int (self ._layer_offsets [block_id + 2 ]))
419420 idx = utils .toindex (rst (0 )).tousertensor ()
420421 eid = utils .toindex (rst (1 ))
421422 num_edges = int (len (idx ) / 2 )
@@ -446,9 +447,10 @@ def block_adjacency_matrix(self, block_id, ctx):
446447 fmt = F .get_preferred_sparse_format ()
447448 # We need to extract two layers.
448449 layer0_size = self ._layer_offsets [block_id + 1 ] - self ._layer_offsets [block_id ]
449- rst = _CAPI_NodeFlowGetBlockAdj (self ._graph ._handle , fmt , layer0_size ,
450- self ._layer_offsets [block_id + 1 ],
451- self ._layer_offsets [block_id + 2 ])
450+ rst = _CAPI_NodeFlowGetBlockAdj (self ._graph ._handle , fmt ,
451+ int (layer0_size ),
452+ int (self ._layer_offsets [block_id + 1 ]),
453+ int (self ._layer_offsets [block_id + 2 ]))
452454 num_rows = self .layer_size (block_id + 1 )
453455 num_cols = self .layer_size (block_id )
454456
0 commit comments