diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2015-06-04 12:30:06 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-06-04 16:23:16 -0600 |
commit | 403d61d1448eb8ee6a2ddc81865d9ebaf1ef73df (patch) | |
tree | 71da0b78e413453f325fafd2998086f325520b4f /numpy/lib/utils.py | |
parent | 36b940497f194b1b90e9ff48c58a01a6e74c09de (diff) | |
download | numpy-403d61d1448eb8ee6a2ddc81865d9ebaf1ef73df.tar.gz |
ENH: Add inline C function to import and cache Python functions.
A new inline function 'npy_cache_pyfunc' is provided for the common
operation of inporting and caching a Python function in static
variables. The intended usage is as follows.
int myfunc()
{
static PyObject *cache = NULL:
npy_cache_pyfunc("the.module.name", "function", &cache);
...
}
Errors are not recoverable, so checked with assert for debugging.
Diffstat (limited to 'numpy/lib/utils.py')
0 files changed, 0 insertions, 0 deletions