当前位置: 首页>>代码示例>>Python>>正文


Python numpy.get_include函数代码示例

本文整理汇总了Python中numpy.get_include函数的典型用法代码示例。如果您正苦于以下问题:Python get_include函数的具体用法?Python get_include怎么用?Python get_include使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_include函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: configuration

def configuration(parent_package="", top_path=None):
    config = Configuration("math", parent_package, top_path)
    config.add_subpackage("test")
    config.add_subpackage("fit")

    # =====================================
    # histogramnd
    # =====================================
    histo_dir = "histogramnd"
    histo_src = [os.path.join(histo_dir, srcf) for srcf in ["chistogramnd.pyx", "src/histogramnd_c.c"]]
    histo_inc = [os.path.join(histo_dir, "include"), numpy.get_include()]

    config.add_extension("chistogramnd", sources=histo_src, include_dirs=histo_inc, language="c")
    # =====================================
    # =====================================

    # =====================================
    # histogramnd_lut
    # =====================================
    histo_dir = "histogramnd"
    histo_src = [os.path.join(histo_dir, srcf) for srcf in ["chistogramnd_lut.pyx"]]
    histo_inc = [os.path.join(histo_dir, "include"), numpy.get_include()]

    config.add_extension("chistogramnd_lut", sources=histo_src, include_dirs=histo_inc, language="c")
    # =====================================
    # =====================================

    # marching cubes
    mc_dir = "marchingcubes"
    mc_src = [os.path.join(mc_dir, srcf) for srcf in ["marchingcubes.pyx", "mc_lut.cpp"]]
    config.add_extension("marchingcubes", sources=mc_src, include_dirs=[mc_dir, numpy.get_include()], language="c++")

    return config
开发者ID:PiRK,项目名称:silx,代码行数:33,代码来源:setup.py

示例2: initialize_options

 def initialize_options(self):
     from numpy import get_include
     _build_ext.initialize_options(self)
     if self.include_dirs is None:
         self.include_dirs = get_include()
     else:
         self.include_dirs += get_include()
开发者ID:LeeKamentsky,项目名称:python-javabridge,代码行数:7,代码来源:setup.py

示例3: geometry_extensions

def geometry_extensions():
    compiler_args = (compiler.compiler_args_sse2 + compiler.compiler_args_sse3 + compiler.compiler_args_sse41 +
                     compiler.compiler_args_opt + compiler.compiler_args_sse41)
    define_macros = compiler.define_macros_sse41

    return [
        Extension('mdtraj.geometry._geometry',
            sources=['MDTraj/geometry/src/geometry.c',
                     'MDTraj/geometry/src/sasa.c',
                     'MDTraj/geometry/src/dssp.cpp',
                     'MDTraj/geometry/src/_geometry.pyx'],
            include_dirs=['MDTraj/geometry/include',
                          'MDTraj/geometry/src/kernels',
                          numpy.get_include()],
            define_macros=define_macros,
            extra_compile_args=compiler_args,
            libraries=extra_cpp_libraries,
            language='c++'),
        Extension('mdtraj.geometry.drid',
            sources=["MDTraj/geometry/drid.pyx",
                     "MDTraj/geometry/src/dridkernels.c",
                     "MDTraj/geometry/src/cephes/cbrt.c",
                     "MDTraj/geometry/src/cephes/isnan.c",
                     "MDTraj/geometry/src/moments.c"],
            include_dirs=["MDTraj/geometry/include",
                          "MDTraj/geometry/include/cephes",
                          numpy.get_include()],
            define_macros=define_macros,
            extra_compile_args=compiler_args)
        ]
开发者ID:HubLot,项目名称:mdtraj,代码行数:30,代码来源:setup.py

示例4: configuration

def configuration(parent_package='', top_path=None):
    import numpy
    from numpy.distutils.misc_util import Configuration

    config = Configuration('neighbors', parent_package, top_path)
    libraries = []
    if os.name == 'posix':
        libraries.append('m')

    config.add_extension('ball_tree',
                         sources=['ball_tree.c'],
                         include_dirs=[numpy.get_include()],
                         libraries=libraries)

    config.add_extension('kd_tree',
                         sources=['kd_tree.c'],
                         include_dirs=[numpy.get_include()],
                         libraries=libraries)

    config.add_extension('dist_metrics',
                         sources=['dist_metrics.c'],
                         include_dirs=[numpy.get_include(),
                                       os.path.join(numpy.get_include(),
                                                    'numpy')],
                         libraries=libraries)

    config.add_extension('typedefs',
                         sources=['typedefs.c'],
                         include_dirs=[numpy.get_include()],
                         libraries=libraries)

    config.add_subpackage('tests')

    return config
开发者ID:1992huanghai,项目名称:scikit-learn,代码行数:34,代码来源:setup.py

示例5: configuration

def configuration(parent_package="", top_path=None):
    config = Configuration("tree", parent_package, top_path)
    libraries = []
    if os.name == 'posix':
        libraries.append('m')
        
    # check for pre-compiled versions for the encountered sklearn version
    if not os.path.isdir("{}/headers/{}".format(os.path.dirname(os.path.realpath(__file__)), sklearn.__version__)) or \
       not os.path.isfile("{}/headers/{}/_tree.c".format(os.path.dirname(os.path.realpath(__file__)), sklearn.__version__)):
        raise Exception(\
"""sklearnef holds no pre-compiled _tree.c for your current scikit-learn version ({version}).
Please download the corresponding header file from \
https://raw.githubusercontent.com/scikit-learn/scikit-learn/{version}/sklearn/tree/_tree.pxd,
place it in sklearnef/tree/headers/sklearn/tree/ and compile _tree.pyx with cython using \
'cython _tree.pyx -o headers/{version}/_tree.c -I headers/'. Then re-run \
the installation of sklearnef.""".format(version=sklearn.__version__))

    config.add_extension("_diffentropy",
                         sources=["headers/_diffentropy.c"],
                         include_dirs=[numpy.get_include()],
                         libraries=libraries + ['lapack', 'blas'],
                         extra_compile_args=["-O3"])

    config.add_extension("_tree",
                         sources=["headers/{version}/_tree.c".format(version=sklearn.__version__)],
                         include_dirs=[numpy.get_include()],
                         libraries=libraries,
                         extra_compile_args=["-O3"])
    
    config.add_subpackage("tests")

    return config
开发者ID:loli,项目名称:sklearnef,代码行数:32,代码来源:setup.py

示例6: configuration

def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration

    cblas_libs, blas_info = get_blas_info()

    libraries = []
    if os.name == 'posix':
        cblas_libs.append('m')
        libraries.append('m')

    config = Configuration('cluster', parent_package, top_path)
    config.add_extension('_hierarchical',
                         sources=['_hierarchical.c'],
                         include_dirs=[numpy.get_include()],
                         libraries=libraries)

    config.add_extension(
        '_k_means',
        libraries=cblas_libs,
        sources=['_k_means.c'],
        include_dirs=[join('..', 'src', 'cblas'),
                      numpy.get_include(),
                      blas_info.pop('include_dirs', [])],
        extra_compile_args=blas_info.pop('extra_compile_args', []),
        **blas_info
    )
    return config
开发者ID:2011200799,项目名称:scikit-learn,代码行数:27,代码来源:setup.py

示例7: cython_modules

def cython_modules():
  try:
    from Cython.Build import cythonize

    ext = [
            Extension('glu.lib._illumina',              sources = ['glu/lib/_illumina.pyx']),
            Extension('glu.lib.genolib.helpers',        sources = ['glu/lib/genolib/helpers.pyx'],
                                                   include_dirs = [np.get_include()]),
            Extension('glu.lib.seqlib._cigar',          sources = ['glu/lib/seqlib/_cigar.pyx']),
            Extension('glu.lib.seqlib._edits',          sources = ['glu/lib/seqlib/_edits.pyx']),
            Extension('glu.lib.seqlib.gc',              sources = ['glu/lib/seqlib/gc.pyx']),
            Extension('glu.lib.seqlib.intervaltree',    sources = ['glu/lib/seqlib/intervaltree.pyx']),
          ]

    ext = cythonize(ext)

  # Fall back to using pre-generated C files
  except ImportError:
    ext = [
            Extension('glu.lib._illumina',              sources = ['glu/lib/_illumina.c']),
            Extension('glu.lib.genolib.helpers',        sources = ['glu/lib/genolib/helpers.c'],
                                                   include_dirs = [np.get_include()]),
            Extension('glu.lib.seqlib._cigar',          sources = ['glu/lib/seqlib/_cigar.c']),
            Extension('glu.lib.seqlib._edits',          sources = ['glu/lib/seqlib/_edits.c']),
            Extension('glu.lib.seqlib.gc',              sources = ['glu/lib/seqlib/gc.c']),
            Extension('glu.lib.seqlib.intervaltree',    sources = ['glu/lib/seqlib/intervaltree.c']),
          ]

  return ext
开发者ID:gzhang-hli,项目名称:glu-genetics,代码行数:29,代码来源:setup.py

示例8: configuration

def configuration(parent_package='', top_path=None):
    import numpy
    from numpy.distutils.misc_util import Configuration

    config = Configuration('utils', parent_package, top_path)
    config.add_subpackage('sparsetools')

    cblas_libs, blas_info = get_blas_info()

    libraries = []
    if os.name == 'posix':
        libraries.append('m')
        cblas_libs.append('m')

    config.add_extension('arraybuilder', sources=['arraybuilder.c'])

    config.add_extension('sparsefuncs', sources=['sparsefuncs.c'],
                         libraries=libraries)

    config.add_extension('arrayfuncs',
                         sources=['arrayfuncs.c'],
                         depends=[join('src', 'cholesky_delete.h')],
                         libraries=cblas_libs,
                         include_dirs=[join('..', 'src', 'cblas'),
                                       numpy.get_include(),
                                       blas_info.pop('include_dirs', [])],
                         extra_compile_args=blas_info.pop('extra_compile_args',
                                                          []),
                         **blas_info
                         )

    config.add_extension(
        'murmurhash',
        sources=['murmurhash.c', join('src', 'MurmurHash3.cpp')],
        include_dirs=['src'])

    config.add_extension('lgamma',
                         sources=['lgamma.cpp', join('src', 'Gamma.cpp')],
                         include_dirs=['src'],
                         libraries=libraries)

    config.add_extension('graph_shortest_path',
                         sources=['graph_shortest_path.c'],
                         include_dirs=[numpy.get_include()])

    config.add_extension('seq_dataset',
                         sources=['seq_dataset.c'],
                         include_dirs=[numpy.get_include()])

    config.add_extension('weight_vector',
                         sources=['weight_vector.c'],
                         include_dirs=[numpy.get_include()],
                         libraries=libraries)

    config.add_extension("random",
                         sources=["random.c"],
                         include_dirs=[numpy.get_include()],
                         libraries=libraries)

    return config
开发者ID:auduno,项目名称:scikit-learn,代码行数:60,代码来源:setup.py

示例9: configuration

def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration('linear_model', parent_package, top_path)

    cblas_libs, blas_info = get_blas_info()

    libraries = []
    if os.name == 'posix':
        cblas_libs.append('m')
        libraries.append('m')

    config.add_extension('cd_fast',
         sources=['cd_fast.c'],
         libraries=cblas_libs,
         include_dirs=[join('..', 'src', 'cblas'),
                       numpy.get_include(),
                       blas_info.pop('include_dirs', [])],
         extra_compile_args=blas_info.pop('extra_compile_args', []),
         **blas_info
         )

    config.add_extension('sgd_fast',
         sources=['sgd_fast.c'],
         include_dirs=[numpy.get_include()],
         libraries=libraries,
         )

    # add other directories
    config.add_subpackage('tests')

    return config
开发者ID:Jetafull,项目名称:scikit-learn,代码行数:32,代码来源:setup.py

示例10: configuration

def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration
    from numpy.distutils.system_info import get_info, BlasNotFoundError
    config = Configuration('map', parent_package, top_path)
    config.add_data_dir('tests')
    libraries = []
    if os.name == 'posix':
        libraries.append('m')

    config.add_extension('ball_tree',
                         sources=['ball_tree.c'],
                         include_dirs=[numpy.get_include()],
                         libraries=libraries)

    config.add_extension('ckdtree',
                         sources=['ckdtree.c'],
                         include_dirs=[numpy.get_include()],
                         libraries=libraries)

    config.add_extension('_load_nn_field_data',
                         sources=['_load_nn_field_data.c'],
                         include_dirs=[numpy.get_include()])

    config.add_extension('_gate_to_grid_map',
                         sources=['_gate_to_grid_map.c'],
                         libraries=libraries)

    return config
开发者ID:aperezhortal,项目名称:pyart,代码行数:28,代码来源:setup.py

示例11: configuration

def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration('lightning', parent_package, top_path)

    randomdir = os.path.join(top_path, "lightning", "random")

    config.add_extension('dataset_fast',
                         sources=['dataset_fast.cpp'],
                         include_dirs=[numpy.get_include(), randomdir])

    config.add_extension('dual_cd_fast',
                         sources=['dual_cd_fast.cpp'],
                         include_dirs=[numpy.get_include(), randomdir])

    config.add_extension('loss_fast',
                         sources=['loss_fast.cpp'],
                         include_dirs=[numpy.get_include(), randomdir])

    config.add_extension('primal_cd_fast',
                         sources=['primal_cd_fast.cpp'],
                         include_dirs=[numpy.get_include(), randomdir])

    config.add_extension('sgd_fast',
                         sources=['sgd_fast.cpp'],
                         include_dirs=[numpy.get_include(), randomdir])

    config.add_subpackage('random')
    config.add_subpackage('tests')
    config.add_subpackage('datasets')

    return config
开发者ID:Snazz2001,项目名称:lightning,代码行数:32,代码来源:setup.py

示例12: make_extension_modules

def make_extension_modules(mode="disable_threads", nfft_library_dirs=[], nfft_include_dirs=[]):

    ext_icosahedron = Extension(
        "condor.utils.icosahedron",
        sources=["src/utils/icosahedron/icosahedronmodule.c"],
        include_dirs=[numpy.get_include()],
    )

    _nfft_libraries = {
        "disable_threads": ["nfft3"],
        "enable_threads": ["nfft3_threads" ,"fftw3_threads" ,"fftw3"]
    }
    _nfft_macros = {
        "disable_threads" : [],
        "enable_threads" : [("ENABLE_THREADS", None)],
    }
    
    ext_nfft = Extension(
        "condor.utils.nfft",
        sources=["src/utils/nfft/nfftmodule.c"],
        library_dirs=nfft_library_dirs,
        libraries=_nfft_libraries[mode],
        include_dirs=[numpy.get_include()] + nfft_include_dirs,
        define_macros=_nfft_macros[mode],
        runtime_library_dirs = nfft_library_dirs,
        extra_link_args = [] if (nfft_library_dirs == []) else ['-Wl,-rpath,'+nfft_library_dirs[0]+',-L'+nfft_library_dirs[0]],
    )

    return [ext_icosahedron, ext_nfft]
开发者ID:FXIhub,项目名称:condor,代码行数:29,代码来源:setup.py

示例13: extensions

def extensions():
    __builtins__.__NUMPY_SETUP__ = False
    import numpy as np
    ext_modules = [
        Extension(
            'pysas.world',
            ["pysas/world.pyx"] + glob("lib/world/*.cpp"),
            include_dirs=['lib/world', np.get_include()],
            extra_compile_args=["-O3"],
            language="c++",
        ),
        Extension(
            'pysas.mcep',
            ["pysas/mcep.pyx"],
            include_dirs=[np.get_include()],
            extra_compile_args=["-O3"],
            language="c++",
        ),
        Extension(
            'pysas.excite',
            ["pysas/excite.pyx"],
            include_dirs=[np.get_include()],
            extra_compile_args=["-O3"],
            language="c++",
        ),
        Extension(
            'pysas.synthesis.mlsa',
            ["pysas/synthesis/mlsa.pyx"],
            include_dirs=[np.get_include()],
            extra_compile_args=["-O3"],
            language="c++",
        )
    ]
    return ext_modules
开发者ID:shunsukeaihara,项目名称:pysas,代码行数:34,代码来源:setup.py

示例14: configuration

def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration
    from numpy.distutils.system_info import get_info, BlasNotFoundError

    config = Configuration('pyLLE', parent_package, top_path)

    config.add_subpackage('python_only')

    config.add_extension('ball_tree',
                         language='c++',
                         sources=[join('wrappers', 'ball_tree.cpp')],
                         depends=[join('include', 'BallTree.h'),
                                  join('include', 'BallTreePoint.h')],
                         include_dirs=['include',numpy.get_include()])
    
    config.add_extension('LLE',
                         language='c++',
                         sources=[join('wrappers','LLE.cpp')]\
                             + MatVec_sources + LLE_sources,
                         libraries=['stdc++','blas','lapack','arpack'],
                         library_dirs = LIBS,
                         include_dirs=['include','lib/MatVec',
                                       numpy.get_include()] )
                         

    return config
开发者ID:jakevdp,项目名称:pyLLE,代码行数:26,代码来源:setup.py

示例15: main

def main():

    ext_modules = [

        Extension("lz4.lz4",
                  sources=["lz4/lz4.pyx", os.path.join(c_src_dir, 'lz4.c')],
                  include_dirs=[np.get_include(), c_src_dir],
                  define_macros=[],
                  extra_link_args=[],
                  extra_compile_args=['-mssse3', '-std=c99']),

        Extension("lz4.shuffle",
                  sources=["lz4/shuffle.pyx"],
                  include_dirs=[np.get_include()],
                  define_macros=[],
                  extra_link_args=[],
                  extra_compile_args=['-mssse3', '-std=c99']),

                  ]

    kwargs = dict(
        name = 'lz4',
        packages = ['lz4'],
        cmdclass = {'build_ext': build_ext},
        ext_modules = cythonize(ext_modules),
        )

    setup(**kwargs)
开发者ID:joshayers,项目名称:python-lz4,代码行数:28,代码来源:setup.py


注:本文中的numpy.get_include函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。