This is a pre-release version (2.5.0.dev0+git20251130.2de293a).Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / lib / introspect / opt_func_info

function

numpy.lib.introspect:opt_func_info

source: build-install/usr/lib/python3.14/site-packages/numpy/lib/introspect.py:8

Signature

def opt_func_info(func_name = None, signature = None)

Summary

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))   # may vary (architecture)
✗
{
  "absolute": {
    "dd": {
      "current": "baseline(X86_V2)",
      "available": "baseline(X86_V2)"
    },
    "Ff": {
      "current": "X86_V4",
      "available": "X86_V4 X86_V3 baseline(X86_V2)"
    },
    "Dd": {
      "current": "X86_V4",
      "available": "X86_V4 X86_V3 baseline(X86_V2)"
    }
  },
  "add": {
    "ddd": {
      "current": "X86_V3",
      "available": "X86_V3 baseline(X86_V2)"
    },
    "FFF": {
      "current": "X86_V3",
      "available": "X86_V3 baseline(X86_V2)"
    }
  }
}

Aliases

  • numpy.lib.introspect.opt_func_info