K i dZdgZddZy)z! Introspection helper functions. opt_func_infoNc ddl}ddlm}ddlm |F|j |}|j Dcic]\}}|j |r||}}}n|}|j|j | i}|j D]B\}}i} |j D] \} }t fd| Ds|| | <"| s>| ||<D|S|}|Scc}}w)am Returns a dictionary containing the currently supported CPU dispatched features for all optimized functions. Parameters ---------- func_name : str (optional) Regular expression to filter by function name. signature : str (optional) Regular expression to filter by data type. Returns ------- dict A dictionary where keys are optimized function names and values are nested dictionaries indicating supported targets based on data types. Examples -------- Retrieve dispatch information for functions named 'add' or 'sub' and data types 'float64' or 'float32': >>> import numpy as np >>> dict = np.lib.introspect.opt_func_info( ... func_name="add|abs", signature="float64|complex64" ... ) >>> import json >>> print(json.dumps(dict, indent=2)) { "absolute": { "dd": { "current": "SSE41", "available": "SSE41 baseline(SSE SSE2 SSE3)" }, "Ff": { "current": "FMA3__AVX2", "available": "AVX512F FMA3__AVX2 baseline(SSE SSE2 SSE3)" }, "Dd": { "current": "FMA3__AVX2", "available": "AVX512F FMA3__AVX2 baseline(SSE SSE2 SSE3)" } }, "add": { "ddd": { "current": "FMA3__AVX2", "available": "FMA3__AVX2 baseline(SSE SSE2 SSE3)" }, "FFF": { "current": "FMA3__AVX2", "available": "FMA3__AVX2 baseline(SSE SSE2 SSE3)" } } } N)__cpu_targets_info__)dtypec3K|]8}j|xs!j|j:yw)N)searchname).0cr sig_patterns Z/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/numpy/lib/introspect.py z opt_func_info..Vs? &&q)N[-?-?a -NNs>A)renumpy._core._multiarray_umathrrcompileitemsrany) func_name signaturertargets func_patternkvmatching_funcs matching_sigsmatching_charscharsrr s @@r rrstM3zz), $]]_ Q""1% qD  !jj+  "((* 2DAqN"#'') 4w"-4N5)  4 #1 a  2 ' - sC )NN)__doc____all__rr r"s  Wr!