當前位置: 首頁>>代碼示例>>Python>>正文


Python numpy.get_include方法代碼示例

本文整理匯總了Python中numpy.get_include方法的典型用法代碼示例。如果您正苦於以下問題:Python numpy.get_include方法的具體用法?Python numpy.get_include怎麽用?Python numpy.get_include使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在numpy的用法示例。


在下文中一共展示了numpy.get_include方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: configuration

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import get_include [as 別名]
def configuration(parent_package='', top_path=None):
    import numpy
    from numpy.distutils.misc_util import Configuration

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

    if platform.python_implementation() != 'PyPy':
        config.add_extension('_base',
                             sources=['_base.pyx'],
                             include_dirs=[numpy.get_include()],
                             libraries=libraries)
    config.add_subpackage('tests')
    config.add_data_dir('data')

    return config 
開發者ID:pulse2percept,項目名稱:pulse2percept,代碼行數:20,代碼來源:setup.py

示例2: configuration

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import get_include [as 別名]
def configuration(parent_package='', top_path=None):
    import numpy
    from numpy.distutils.misc_util import Configuration

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

    if platform.python_implementation() != 'PyPy':
        config.add_extension('_beyeler2019',
                             sources=['_beyeler2019.pyx'],
                             include_dirs=[numpy.get_include()],
                             libraries=libraries)
        config.add_extension('_horsager2009',
                             sources=['_horsager2009.pyx'],
                             include_dirs=[numpy.get_include()],
                             libraries=libraries)
        config.add_extension('_nanduri2012',
                             sources=['_nanduri2012.pyx'],
                             include_dirs=[numpy.get_include()],
                             libraries=libraries)
    config.add_subpackage("tests")

    return config 
開發者ID:pulse2percept,項目名稱:pulse2percept,代碼行數:27,代碼來源:setup.py

示例3: configuration

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import get_include [as 別名]
def configuration(parent_package="", top_path=None):
    config = Configuration("metrics", parent_package, top_path)

    cblas_libs, blas_info = get_blas_info()
    if os.name == 'posix':
        cblas_libs.append('m')

    config.add_extension("_kernel_fast",
                         sources=["_kernel_fast.c"],
                         include_dirs=[os.path.join('..', 'src', 'cblas'),
                                       numpy.get_include(),
                                       blas_info.pop('include_dirs', [])],
                         libraries=cblas_libs,
                         extra_compile_args=blas_info.pop('extra_compile_args',
                                                          []),
                         **blas_info)
    config.add_subpackage('tests')

    return config 
開發者ID:tgsmith61591,項目名稱:skutil,代碼行數:21,代碼來源:setup.py

示例4: configuration

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import get_include [as 別名]
def configuration(parent_package='', top_path=None):
    from numpy import get_include
    from numpy.distutils.system_info import get_info, NotFoundError
    from numpy.distutils.misc_util import Configuration

    lapack_opt = get_info('lapack_opt')

    if not lapack_opt:
        raise NotFoundError('no lapack/blas resources found')

    config = Configuration('_trlib', parent_package, top_path)
    config.add_extension('_trlib',
                         sources=['_trlib.c', 'trlib_krylov.c',
                                  'trlib_eigen_inverse.c', 'trlib_leftmost.c',
                                  'trlib_quadratic_zero.c', 'trlib_tri_factor.c'],
                         include_dirs=[get_include(), 'trlib'],
                         extra_info=lapack_opt,
                         )
    return config 
開發者ID:ryfeus,項目名稱:lambda-packs,代碼行數:21,代碼來源:setup.py

示例5: configuration

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import get_include [as 別名]
def configuration(parent_package="", top_path=None):
    cblas_libs, blas_info = get_blas_info()

    # Use this rather than cblas_libs so we don't fail on Windows
    libraries = []
    if os.name == 'posix':
        cblas_libs.append('m')
        libraries.append('m')

    config = Configuration("utils", parent_package, top_path)
    config.add_extension("_array",
                         sources=["_array.pyx"],
                         include_dirs=[numpy.get_include(),
                                       blas_info.pop('include_dirs', [])],
                         libraries=libraries,
                         extra_compile_args=blas_info.pop(
                             'extra_compile_args', []),
                         **blas_info)

    config.add_subpackage('tests')

    return config 
開發者ID:alkaline-ml,項目名稱:pmdarima,代碼行數:24,代碼來源:setup.py

示例6: configuration

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import get_include [as 別名]
def configuration(parent_package="", top_path=None):
    cblas_libs, blas_info = get_blas_info()

    # Use this rather than cblas_libs so we don't fail on Windows
    libraries = []
    if os.name == 'posix':
        cblas_libs.append('m')
        libraries.append('m')

    config = Configuration("arima", parent_package, top_path)
    config.add_extension("_arima",
                         sources=["_arima.pyx"],
                         include_dirs=[numpy.get_include(),
                                       # Should this be explicitly included?:
                                       '_arima_fast_helpers.h',
                                       blas_info.pop('include_dirs', [])],
                         libraries=libraries,
                         extra_compile_args=blas_info.pop(
                             'extra_compile_args', []),
                         **blas_info)

    config.add_subpackage('tests')
    config.add_data_dir('tests/data')

    return config 
開發者ID:alkaline-ml,項目名稱:pmdarima,代碼行數:27,代碼來源:setup.py

示例7: configuration

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import get_include [as 別名]
def configuration(parent_package="", top_path=None):
    cblas_libs, blas_info = get_blas_info()

    # Use this rather than cblas_libs so we don't fail on Windows
    libraries = []
    if os.name == 'posix':
        cblas_libs.append('m')
        libraries.append('m')

    config = Configuration("exog", parent_package, top_path)
    config.add_extension("_fourier",
                         sources=["_fourier.pyx"],
                         include_dirs=[numpy.get_include(),
                                       blas_info.pop('include_dirs', [])],
                         libraries=libraries,
                         extra_compile_args=blas_info.pop(
                             'extra_compile_args', []),
                         **blas_info)

    config.add_subpackage('tests')

    return config 
開發者ID:alkaline-ml,項目名稱:pmdarima,代碼行數:24,代碼來源:setup.py

示例8: configuration

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import get_include [as 別名]
def configuration(parent_package="", top_path=None):
    config = Configuration("metrics", parent_package, top_path)

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

    config.add_extension("_confusion_matrix",
                         sources=["_confusion_matrix.pyx"],
                         include_dirs=[numpy.get_include()],
                         libraries=libraries,
                         extra_compile_args=["-O3"])
    config.add_extension("_classification_performance_evaluator",
                         sources=["_classification_performance_evaluator.pyx"],
                         include_dirs=[numpy.get_include()],
                         libraries=libraries,
                         extra_compile_args=["-O3"])

    return config 
開發者ID:scikit-multiflow,項目名稱:scikit-multiflow,代碼行數:21,代碼來源:setup.py

示例9: finalize_options

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import get_include [as 別名]
def finalize_options(self):
                _build_ext.finalize_options(self)
                # Prevent numpy from thinking it is still in its setup process:
                try:
                    __builtins__.__NUMPY_SETUP__ = False
                except:
                    try:
                        # For python 3
                        import builtins
                        builtins.__NUMPY_SETUP__ = False
                    except:
                        warn("Skipping numpy hack; if installation fails, try installing numpy first")
                import numpy
                self.include_dirs.append(numpy.get_include())
                if numpy.__dict__.get('quaternion') is not None:
                    from distutils.errors import DistutilsError
                    raise DistutilsError('The target NumPy already has a quaternion type') 
開發者ID:moble,項目名稱:quaternion,代碼行數:19,代碼來源:setup.py

示例10: configuration

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import get_include [as 別名]
def configuration(parent_package='', top_path=None):
    import numpy
    from numpy.distutils.misc_util import Configuration

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

    config.add_data_dir('tests')

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

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

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

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

    return config 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:27,代碼來源:setup.py

示例11: run

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import get_include [as 別名]
def run(self):
        # add numpy headers
        import numpy
        self.include_dirs.append(numpy.get_include())

        # add dimod headers
        include = os.path.join(os.path.dirname(__file__), 'dimod', 'include')
        self.include_dirs.append(include)

        if self.build_tests:

            test_extensions = [Extension('*', ['tests/test_*'+ext])]
            if USE_CYTHON:
                test_extensions = cythonize(test_extensions,
                                            # annotate=True
                                            )
            self.extensions.extend(test_extensions)

        super().run() 
開發者ID:dwavesystems,項目名稱:dimod,代碼行數:21,代碼來源:setup.py

示例12: configuration

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import get_include [as 別名]
def configuration(parent_package='', top_path=None):
    import numpy
    from numpy.distutils.misc_util import Configuration

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

    if platform.python_implementation() != 'PyPy':
        config.add_extension('_hashing',
                             sources=['_hashing.pyx'],
                             include_dirs=[numpy.get_include()],
                             libraries=libraries)
    config.add_subpackage("tests")

    return config 
開發者ID:PacktPublishing,項目名稱:Mastering-Elasticsearch-7.0,代碼行數:19,代碼來源:setup.py

示例13: configuration

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import get_include [as 別名]
def configuration(parent_package="", top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration("manifold", parent_package, top_path)

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

    config.add_extension("_utils",
                         sources=["_utils.pyx"],
                         include_dirs=[numpy.get_include()],
                         libraries=libraries,
                         extra_compile_args=["-O3"])

    config.add_extension("_barnes_hut_tsne",
                         sources=["_barnes_hut_tsne.pyx"],
                         include_dirs=[numpy.get_include()],
                         libraries=libraries,
                         extra_compile_args=['-O3'])

    config.add_subpackage('tests')

    return config 
開發者ID:PacktPublishing,項目名稱:Mastering-Elasticsearch-7.0,代碼行數:26,代碼來源:setup.py

示例14: configuration

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import get_include [as 別名]
def configuration(parent_package="", top_path=None):
    config = Configuration("decomposition", parent_package, top_path)

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

    config.add_extension("_online_lda",
                         sources=["_online_lda.pyx"],
                         include_dirs=[numpy.get_include()],
                         libraries=libraries)

    config.add_extension('cdnmf_fast',
                         sources=['cdnmf_fast.pyx'],
                         include_dirs=[numpy.get_include()],
                         libraries=libraries)

    config.add_subpackage("tests")

    return config 
開發者ID:PacktPublishing,項目名稱:Mastering-Elasticsearch-7.0,代碼行數:22,代碼來源:setup.py

示例15: configuration

# 需要導入模塊: import numpy [as 別名]
# 或者: from numpy import get_include [as 別名]
def configuration(parent_package='', top_path=None):
    import numpy
    from numpy.distutils.misc_util import Configuration

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

    config.add_extension('_csr_polynomial_expansion',
                         sources=['_csr_polynomial_expansion.pyx'],
                         include_dirs=[numpy.get_include()],
                         libraries=libraries)

    config.add_subpackage('tests')

    return config 
開發者ID:PacktPublishing,項目名稱:Mastering-Elasticsearch-7.0,代碼行數:19,代碼來源:setup.py


注:本文中的numpy.get_include方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。