python - pythran export dict with tuples as key -


i try use pythran in function need int array , second arg dict tuples of int keys , int value:

myarray = np.array([[0, 0], [0, 1], [1, 1],                     [1, 2], [2, 2], [1, 3]])  dict_with_tuples_key = {(0, 1): 1, (3, 7): 1} 

what correct way inform pythran dict ?:

#pythran export update_dict((int, int):int dict, int[][]) def update_dict(dict_with_tuples_key, myarray):     # dict_with_tuples_key , myarray     # return , updated dict_with_tuples_key     return dict_with_tuples_key 

with (int, int):int dict error:

file "/usr/lib/python2.7/inspect.py", line 526, in findsource   file = getfile(object) file "/usr/lib/python2.7/inspect.py", line 403, in getfile   raise typeerror('{!r} built-in module'.format(object)) typeerror: <module 'sys' (built-in)> built-in module 

from backtrace, seems you're importing sys. in kind of situation, pythran tries source of import module compile it. sys built-in module, fails.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -