{"id":45615,"library":"npx","title":"npx: NumPy Extensions","description":"npx provides some useful extensions for NumPy, such as broadcasting functions, softmax, and block diagonals. Current version 0.1.8 follows a stable release schedule. Requires Python 3.10+.","status":"active","version":"0.1.8","language":"python","source_language":"en","source_url":"https://github.com/sigma-py/npx","tags":["numpy","extensions","softmax","block-diagonal"],"install":[{"cmd":"pip install npx","lang":"bash","label":"Default install"}],"dependencies":[{"reason":"Core dependency for array operations","package":"numpy","optional":false}],"imports":[{"wrong":"from npx import softmax","symbol":"softmax","correct":"from npx import softmax"}],"quickstart":{"code":"import numpy as np\nfrom npx import softmax, block_diag\n\n# Softmax along axis\narr = np.array([[1.0, 2.0], [3.0, 4.0]])\nprint(softmax(arr, axis=1))\n\n# Block diagonal matrix\nmatrices = [np.array([[1, 2], [3, 4]]), np.array([[5]])]\nprint(block_diag(matrices))","lang":"python","description":"Compute softmax and block diagonal using npx."},"warnings":[{"fix":"Replace with scipy.special.softmax or a manual implementation.","message":"softmax from npx is deprecated; use scipy.special.softmax or custom implementation.","severity":"deprecated","affected_versions":">=0.1.0"},{"fix":"Ensure all input arrays have compatible dimensions for concatenation.","message":"block_diag requires a list of arrays; passing mismatched shapes raises ValueError.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'0.1.8':21 '3.10':29 'block':17,34 'block-diagon':33 'broadcast':13 'current':19 'diagon':18,35 'extens':3,8,31 'follow':22 'function':14 'npx':1,4 'numpi':2,10,30 'provid':5 'python':28 'releas':25 'requir':27 'schedul':26 'softmax':15,32 'stabl':24 'use':7 'version':20","created_at":"2026-06-07T12:55:53.162025+00:00","updated_at":"2026-06-07T12:55:53.162025+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'softmax' from 'npx' (/tmp/tmpm7irky5i/venv/lib/python3.12/site-packages/npx/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/sigma-py/npx","github":"https://github.com/sigma-py/npx","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["analytics"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}