bundles / numpy latest / numpy / ctypeslib / load_library
function
numpy.ctypeslib:load_library
source: build-install/usr/lib/python3.14/site-packages/numpy/ctypeslib/_ctypeslib.py :93
Signature
def load_library ( libname , loader_path ) Summary
It is possible to load a library using
Extended Summary
>>> lib = ctypes.cdll[<full_path_name>] # doctest: +SKIPBut there are cross-platform considerations, such as library file extensions, plus the fact Windows will just load the first library it finds with that name. NumPy supplies the load_library function as a convenience.
Parameters
libname: path-likeName of the library, which can have 'lib' as a prefix, but without an extension.
loader_path: path-likeWhere the library can be found.
Returns
ctypes.cdll[libpath]: library objectA ctypes library object
Raises
: OSErrorIf there is no library with the expected extension, or the library is defective and cannot be loaded.
Aliases
-
numpy.ctypeslib.load_library