np_inline

# Copyright (c) 2011 J. David Lee. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without 
# modification, are permitted provided that the following conditions are
# met:
#
#    1. Redistributions of source code must retain the above copyright
#       notice, this list of conditions and the following disclaimer.
#
#    2. Redistributions in binary form must reproduce the above
#       copyright notice, this list of conditions and the following
#       disclaimer in the documentation and/or other materials provided
#       with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.

 
Functions
       
inline(unique_name, args=(), py_types=(), np_types=(), code=None, code_path=None, support_code=None, support_code_path=None, extension_kwargs={}, return_type=None)
Inline C code in your python code. 
 
Parameters:
unique_name : string
    A unique string identifying this bit of code. This should be valid
    to use as a filename.
args : typle
    The arguments passed to the C function. Currently the code can
    accept python ints and floats, as well as numpy numeric arrays 
    of all types. Numpy objects should always be after other 
    objects, and types should correspond with the definitions given
    in py_types and np_types respectively. 
py_types : typle of tuples (python_type, c_name)
    Type specifications for non-numpy arguments. Currently only int 
    and float are valid types. Default is empty tuple.
np_types : typle of tuples (numpy_type, dims, c_name)
    Type specifications for numpy-type arguments. Most numeric numpy 
    types are valid. dims is the integer number of dimensions of the 
    corresponding array. Default is empty tuple.
code : string, optional 
    C-code. One of code and code_path must be given. 
code_path : string, optional
    Full path to c-code. One of code or code_path should be given.
support_code : string, optional 
    C support code. This code will be inserted before the function 
    containing the c-code above. This can include any valid C code 
    including #includes and #defines.
support_code_path : string, optional
    Full path to support code. 
extension_kwargs : dictionary, optiona
    Keyword arguments to pass to the distutils.Extension constructor.
return_type : python primitive type
    Either int or float.
inline_debug(unique_name, args=(), py_types=(), np_types=(), code=None, code_path=None, support_code=None, support_code_path=None, extension_kwargs={}, return_type=None)
Same as inline, but the types of each argument are checked, and 
the code is recompiled the first time this function is called.