how to declare specification of list of list for heapify in jitclass mode

60 Views Asked by At

I am trying to use heapq inside a function of jitclass , the following is my code:

spec = [('sese', types.ListType(types.ListType(types.int32)))]
@jitclass(spec)
class CK ():
    def __init__(self):
        self.sese = [[0,0,0,0]]
    
    def main_ (self):
        heapq.heapify (self.sese)

and it returns error:

Cannot cast list(list(int64)<iv=None>)<iv=None> to ListType[ListType[int32]]:

Would someone be able to guide to the correct way of the implementation of using the heapq in jitclass?

Very kind regards

0

There are 0 best solutions below