Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Sensibilisation à
l'Intelligence Artificielle
Voir le programme détaillé
Module « numpy.ctypeslib »

Fonction load_library - module numpy.ctypeslib

Signature de la fonction load_library

def load_library(libname, loader_path) 

Description

help(numpy.ctypeslib.load_library)

It is possible to load a library using

>>> lib = ctypes.cdll[<full_path_name>] # doctest: +SKIP

But 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.

.. versionchanged:: 1.20.0
    Allow libname and loader_path to take any
    :term:`python:path-like object`.

Parameters
----------
libname : path-like
    Name of the library, which can have 'lib' as a prefix,
    but without an extension.
loader_path : path-like
    Where the library can be found.

Returns
-------
ctypes.cdll[libpath] : library object
   A ctypes library object

Raises
------
OSError
    If there is no library with the expected extension, or the
    library is defective and cannot be loaded.


Vous êtes un professionnel et vous avez besoin d'une formation ? Coder avec une
Intelligence Artificielle
Voir le programme détaillé