bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / f2py / crackfortran / traverse
function
numpy.f2py.crackfortran:traverse
source: build-install/usr/lib/python3.14/site-packages/numpy/f2py/crackfortran.py :3523
Signature
def traverse ( obj , visit , parents = [] , result = None , * args , ** kwargs ) Summary
Traverse f2py data structure with the following visit function:
Extended Summary
def visit(item, parents, result, *args, **kwargs):
"""
parents is a list of key-"f2py data structure" pairs from which items are taken from.
result is a f2py data structure that is filled with the return value of the visit function.
item is 2-tuple (index, value) if parents[-1][1] is a list item is 2-tuple (key, value) if parents[-1][1] is a dict
The return value of visit must be None, or of the same kind as item, that is, if parents[-1] is a list, the return value must be 2-tuple (new_index, new_value), or if parents[-1] is a dict, the return value must be 2-tuple (new_key, new_value).
If new_index or new_value is None, the return value of visit is ignored, that is, it will not be added to the result.
If the return value is None, the content of obj will be traversed, otherwise not. """
Aliases
-
numpy.f2py.crackfortran.traverse