Search is not available for this dataset
repo_id
stringlengths
12
110
file_path
stringlengths
24
164
content
stringlengths
3
89.3M
__index_level_0__
int64
0
0
public_repos/numpy/doc/source/reference
public_repos/numpy/doc/source/reference/distutils/misc_util.rst
distutils.misc_util =================== .. automodule:: numpy.distutils.misc_util :members: :undoc-members: :exclude-members: Configuration
0
public_repos/numpy/doc/source/reference
public_repos/numpy/doc/source/reference/simd/build-options.rst
***************** CPU build options ***************** Description ----------- The following options are mainly used to change the default behavior of optimizations that target certain CPU features: - ``--cpu-baseline``: minimal set of required CPU features. Default value is ``min`` which provides the minimum CPU ...
0
public_repos/numpy/doc/source/reference
public_repos/numpy/doc/source/reference/simd/gen_features.py
""" Generate CPU features tables from CCompilerOpt """ from os import sys, path from numpy.distutils.ccompiler_opt import CCompilerOpt class FakeCCompilerOpt(CCompilerOpt): # disable caching no need for it conf_nocache = True def __init__(self, arch, cc, *args, **kwargs): self.fake_info = (arch, c...
0
public_repos/numpy/doc/source/reference
public_repos/numpy/doc/source/reference/simd/log_example.txt
########### EXT COMPILER OPTIMIZATION ########### Platform : Architecture: x64 Compiler : gcc CPU baseline : Requested : 'min' Enabled : SSE SSE2 SSE3 Flags : -msse -msse2 -msse3 Extra checks: none CPU dispatch : Requested : 'max -xop -fma4' Enabled : SSSE3 SSE41 POPCNT SSE...
0
public_repos/numpy/doc/source/reference
public_repos/numpy/doc/source/reference/simd/how-it-works.rst
********************************* How does the CPU dispatcher work? ********************************* NumPy dispatcher is based on multi-source compiling, which means taking a certain source and compiling it multiple times with different compiler flags and also with different **C** definitions that affect the code pat...
0
public_repos/numpy/doc/source/reference
public_repos/numpy/doc/source/reference/simd/index.rst
.. _numpysimd: .. currentmodule:: numpysimd *********************** CPU/SIMD optimizations *********************** NumPy comes with a flexible working mechanism that allows it to harness the SIMD features that CPUs own, in order to provide faster and more stable performance on all popular platforms. Currently, NumPy ...
0
public_repos/numpy/doc/source/reference
public_repos/numpy/doc/source/reference/simd/simd-optimizations.rst
:orphan: .. raw:: html <html> <head> <meta http-equiv="refresh" content="0; url=index.html"/> </head> </html> The location of this document has been changed , if you are not redirected in few seconds, `click here <index.html>`_.
0
public_repos/numpy/doc/source/reference/simd
public_repos/numpy/doc/source/reference/simd/generated_tables/compilers-diff.inc
.. generated via /numpy/numpy/./doc/source/reference/simd/gen_features.py On x86::Intel Compiler ~~~~~~~~~~~~~~~~~~~~~~ .. table:: :align: left ====================== ===============================================================================================================================================...
0
public_repos/numpy/doc/source/reference/simd
public_repos/numpy/doc/source/reference/simd/generated_tables/cpu_features.inc
.. generated via /numpy/numpy/./doc/source/reference/simd/gen_features.py On x86 ~~~~~~ .. table:: :align: left ============== =======================================================================================================================================================================================...
0
public_repos/numpy/doc/source/reference
public_repos/numpy/doc/source/reference/c-api/dtype.rst
Data type API ============= .. sectionauthor:: Travis E. Oliphant The standard array can have 24 different data types (and has some support for adding your own types). These data types all have an enumerated type, an enumerated type-character, and a corresponding array scalar Python type object (placed in a hierarchy...
0
public_repos/numpy/doc/source/reference
public_repos/numpy/doc/source/reference/c-api/iterator.rst
Array iterator API ================== .. sectionauthor:: Mark Wiebe .. index:: pair: iterator; C-API pair: C-API; iterator .. versionadded:: 1.6 Array iterator -------------- The array iterator encapsulates many of the key features in ufuncs, allowing user code to support features like output parameters, pre...
0
public_repos/numpy/doc/source/reference
public_repos/numpy/doc/source/reference/c-api/data_memory.rst
.. _data_memory: Memory management in NumPy ========================== The `numpy.ndarray` is a python class. It requires additional memory allocations to hold `numpy.ndarray.strides`, `numpy.ndarray.shape` and `numpy.ndarray.data` attributes. These attributes are specially allocated after creating the python object ...
0
public_repos/numpy/doc/source/reference
public_repos/numpy/doc/source/reference/c-api/deprecations.rst
.. _c_api_deprecations: C API deprecations ================== Background ---------- The API exposed by NumPy for third-party extensions has grown over years of releases, and has allowed programmers to directly access NumPy functionality from C. This API can be best described as "organic". It has emerged from multi...
0
public_repos/numpy/doc/source/reference
public_repos/numpy/doc/source/reference/c-api/array.rst
Array API ========= .. sectionauthor:: Travis E. Oliphant | The test of a first-rate intelligence is the ability to hold two | opposed ideas in the mind at the same time, and still retain the | ability to function. | --- *F. Scott Fitzgerald* | For a successful technology, reality must take precedence...
0
public_repos/numpy/doc/source/reference
public_repos/numpy/doc/source/reference/c-api/datetimes.rst
Datetime API ============ NumPy represents dates internally using an int64 counter and a unit metadata struct. Time differences are represented similarly using an int64 and a unit metadata struct. The functions described below are available to to facilitate converting between ISO 8601 date strings, NumPy datetimes, an...
0
public_repos/numpy/doc/source/reference
public_repos/numpy/doc/source/reference/c-api/index.rst
.. _c-api: ########### NumPy C-API ########### .. sectionauthor:: Travis E. Oliphant | Beware of the man who won't be bothered with details. | --- *William Feather, Sr.* | The truth is out there. | --- *Chris Carter, The X Files* NumPy provides a C-API to enable users to extend the system and get acce...
0
public_repos/numpy/doc/source/reference
public_repos/numpy/doc/source/reference/c-api/types-and-structures.rst
***************************** Python types and C-structures ***************************** .. sectionauthor:: Travis E. Oliphant Several new types are defined in the C-code. Most of these are accessible from Python, but a few are not exposed due to their limited use. Every new Python type has an associated :c:expr:`P...
0
public_repos/numpy/doc/source/reference
public_repos/numpy/doc/source/reference/c-api/coremath.rst
NumPy core libraries ==================== .. sectionauthor:: David Cournapeau Starting from numpy 1.3.0, we are working on separating the pure C, "computational" code from the python dependent code. The goal is twofolds: making the code cleaner, and enabling code reuse by other extensions outside numpy (scipy, etc......
0
public_repos/numpy/doc/source/reference
public_repos/numpy/doc/source/reference/c-api/ufunc.rst
ufunc API ========= .. sectionauthor:: Travis E. Oliphant .. index:: pair: ufunc; C-API Constants --------- ``UFUNC_{THING}_{ERR}`` .. c:macro:: UFUNC_FPE_DIVIDEBYZERO .. c:macro:: UFUNC_FPE_OVERFLOW .. c:macro:: UFUNC_FPE_UNDERFLOW .. c:macro:: UFUNC_FPE_INVALID ``PyUFunc_{VALUE}`` .. c...
0
public_repos/numpy/doc/source/reference
public_repos/numpy/doc/source/reference/c-api/config.rst
System configuration ==================== .. sectionauthor:: Travis E. Oliphant When NumPy is built, information about system configuration is recorded, and is made available for extension modules using NumPy's C API. These are mostly defined in ``numpyconfig.h`` (included in ``ndarrayobject.h``). The public symbols...
0
public_repos/numpy/doc/source/reference
public_repos/numpy/doc/source/reference/c-api/generalized-ufuncs.rst
.. _c-api.generalized-ufuncs: ================================== Generalized universal function API ================================== There is a general need for looping over not only functions on scalars but also over functions on vectors (or arrays). This concept is realized in NumPy by generalizing the universal ...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/dev/reviewer_guidelines.rst
.. _reviewer-guidelines: =================== Reviewer guidelines =================== Reviewing open pull requests (PRs) helps move the project forward. We encourage people outside the project to get involved as well; it's a great way to get familiar with the codebase. Who can be a reviewer? ====================== R...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/dev/development_advanced_debugging.rst
.. _advanced_debugging: ======================== Advanced debugging tools ======================== If you reached here, you want to dive into, or use, more advanced tooling. This is usually not necessary for first time contributors and most day-to-day development. These are used more rarely, for example close to a ne...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/dev/howto-docs.rst
.. _howto-docs: ############################################ How to contribute to the NumPy documentation ############################################ This guide will help you decide what to contribute and how to submit it to the official NumPy documentation. *************************** Documentation team meetings *...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/dev/releasing.rst
=================== Releasing a version =================== The following guides include detailed information on how to prepare a NumPy release. .. _prepare_release: ------------------------ How to prepare a release ------------------------ .. include:: ../../HOWTO_RELEASE.rst ----------------------- Step-by-step...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/dev/alignment.rst
.. currentmodule:: numpy .. _alignment: **************** Memory alignment **************** NumPy alignment goals ===================== There are three use-cases related to memory alignment in NumPy (as of 1.14): 1. Creating :term:`structured datatypes <structured data type>` with :term:`fields <field>` aligned ...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/dev/development_environment.rst
.. _development-environment: Setting up and using your development environment ================================================= .. _recommended-development-setup: Recommended development setup ----------------------------- Since NumPy contains parts written in C and Cython that need to be compiled before use, make...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/dev/underthehood.rst
.. _underthehood: =========================================== Under-the-hood documentation for developers =========================================== These documents are intended as a low-level look into NumPy; focused towards developers. .. toctree:: :maxdepth: 1 internals internals.code-explanations a...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/dev/gitwash_links.txt
.. _NumPy: https://www.numpy.org .. _`NumPy github`: https://github.com/numpy/numpy .. _`NumPy mailing list`: https://scipy.org/scipylib/mailing-lists.html
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/dev/index.rst
.. _devindex: ##################### Contributing to NumPy ##################### Not a coder? Not a problem! NumPy is multi-faceted, and we can use a lot of help. These are all activities we'd like to get help with (they're all important, so we list them in alphabetical order): - Code maintenance and development - Co...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/dev/internals.rst
.. currentmodule:: numpy .. _numpy-internals: ************************************* Internal organization of NumPy arrays ************************************* It helps to understand a bit about how NumPy arrays are handled under the covers to help understand NumPy better. This section will not go into great detail....
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/dev/depending_on_numpy.rst
.. _for-downstream-package-authors: For downstream package authors ============================== This document aims to explain some best practices for authoring a package that depends on NumPy. Understanding NumPy's versioning and API/ABI stability ------------------------------------------------------ NumPy uses...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/dev/development_workflow.rst
.. _development-workflow: ==================== Development workflow ==================== You already have your own forked copy of the NumPy_ repository, by following :ref:`forking`, :ref:`set-up-fork`, you have configured git_ by following :ref:`configure-git`, and have linked the upstream repository as explained in ...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/dev/internals.code-explanations.rst
.. currentmodule:: numpy .. _c-code-explanations: ************************* NumPy C code explanations ************************* Fanaticism consists of redoubling your efforts when you have forgotten your aim. --- *George Santayana* An authority is a person who can tell you more about something than ...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/dev/howto_build_docs.rst
.. _howto-build-docs: ========================================= Building the NumPy API and reference docs ========================================= If you only want to get the documentation, note that pre-built versions can be found at https://numpy.org/doc/ in several different formats. Development environments =...
0
public_repos/numpy/doc/source/dev
public_repos/numpy/doc/source/dev/governance/governance.rst
================================================================ NumPy project governance and decision-making ================================================================ The purpose of this document is to formalize the governance process used by the NumPy project in both ordinary and extraordinary situations, a...
0
public_repos/numpy/doc/source/dev
public_repos/numpy/doc/source/dev/governance/index.rst
##################### NumPy governance ##################### .. toctree:: :maxdepth: 3 governance
0
public_repos/numpy/doc/source/dev
public_repos/numpy/doc/source/dev/gitwash/following_latest.rst
.. _following-latest: These are the instructions if you just want to follow the latest *NumPy* source, but you don't need to do any development for now. If you do want to contribute a patch (excellent!) or do more extensive NumPy development, see :ref:`development-workflow`. The steps are: * :ref:`install-git` * get...
0
public_repos/numpy/doc/source/dev
public_repos/numpy/doc/source/dev/gitwash/git_intro.rst
Install git =========== Developing with git can be done entirely without github. Git is a distributed version control system. In order to use git on your machine you must `install it`_. .. include:: git_links.inc
0
public_repos/numpy/doc/source/dev
public_repos/numpy/doc/source/dev/gitwash/dot2_dot3.rst
.. _dot2-dot3: ======================================== Two and three dots in difference specs ======================================== Thanks to Yarik Halchenko for this explanation. Imagine a series of commits A, B, C, D... Imagine that there are two branches, *topic* and *main*. You branched *topic* off *main*...
0
public_repos/numpy/doc/source/dev
public_repos/numpy/doc/source/dev/gitwash/development_setup.rst
.. _development-setup: ############################################################################## Setting up git for NumPy development ############################################################################## To contribute code or documentation, you first need #. git installed on your machine #. a GitHub ac...
0
public_repos/numpy/doc/source/dev
public_repos/numpy/doc/source/dev/gitwash/index.rst
.. _using-git: .. _git-development: ===================== Git for development ===================== These pages describe a general git_ and github_ workflow. This is not a comprehensive git_ reference. It's tailored to the github_ hosting service. You may well find better or quicker ways of getting stuff done with ...
0
public_repos/numpy/doc/source/dev
public_repos/numpy/doc/source/dev/gitwash/configure_git.rst
.. _configure-git: ================= Git configuration ================= .. _git-config-basic: Overview ======== Your personal git_ configurations are saved in the ``.gitconfig`` file in your home directory. Here is an example ``.gitconfig`` file:: [user] name = Your Name email = you@yourdoma...
0
public_repos/numpy/doc/source/dev
public_repos/numpy/doc/source/dev/gitwash/git_links.inc
.. This (-*- rst -*-) format file contains commonly used link targets and name substitutions. It may be included in many files, therefore it should only contain link targets and name substitutions. Try grepping for "^\.\. _" to find plausible candidates for this list. .. NOTE: reST targets are __not_c...
0
public_repos/numpy/doc/source/dev
public_repos/numpy/doc/source/dev/gitwash/git_resources.rst
.. _git-resources: ========================= Additional Git_ resources ========================= Tutorials and summaries ======================= * `github help`_ has an excellent series of how-to guides. * `learn.github`_ has an excellent series of tutorials * The `pro git book`_ is a good in-depth book on git. * Th...
0
public_repos/numpy/doc/source/dev
public_repos/numpy/doc/source/dev/examples/doxy_rst.h
/** * A comment block contains reST markup. * @rst * .. note:: * * Thanks to Breathe_, we were able to bring it to Doxygen_ * * Some code example:: * * int example(int x) { * return x * 2; * } * @endrst */ void doxy_reST_example(void);
0
public_repos/numpy/doc/source/dev
public_repos/numpy/doc/source/dev/examples/doxy_func.h
/** * This a simple brief. * * And the details goes here. * Multi lines are welcome. * * @param num leave a comment for parameter num. * @param str leave a comment for the second parameter. * @return leave a comment for the returned value. */ int doxy_javadoc_example(int num, const char *str);
0
public_repos/numpy/doc/source/dev
public_repos/numpy/doc/source/dev/examples/.doxyfile
INPUT += @CUR_DIR INCLUDE_PATH += @CUR_DIR
0
public_repos/numpy/doc/source/dev
public_repos/numpy/doc/source/dev/examples/doxy_class.hpp
/** * Template to represent limbo numbers. * * Specializations for integer types that are part of nowhere. * It doesn't support with any real types. * * @param Tp Type of the integer. Required to be an integer type. * @param N Number of elements. */ template<typename Tp, std::size_t N> class DoxyLimbo { p...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/f2py/f2py-examples.rst
.. _f2py-examples: F2PY examples ============= Below are some examples of F2PY usage. This list is not comprehensive, but can be used as a starting point when wrapping your own code. F2PY walkthrough: a basic extension module ------------------------------------------ Creating source for a basic extension module ~~...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/f2py/f2py.getting-started.rst
.. _f2py-getting-started: ====================================== Three ways to wrap - getting started ====================================== Wrapping Fortran or C functions to Python using F2PY consists of the following steps: * Creating the so-called :doc:`signature file <signature-file>` that contains descripti...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/f2py/f2py-testing.rst
.. _f2py-testing: =============== F2PY test suite =============== F2PY's test suite is present in the directory ``numpy/f2py/tests``. Its aim is to ensure that Fortran language features are correctly translated to Python. For example, the user can specify starting and ending indices of arrays in Fortran. This behavio...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/f2py/usage.rst
=========== Using F2PY =========== This page contains a reference to all command-line options for the ``f2py`` command, as well as a reference to internal functions of the ``numpy.f2py`` module. Using ``f2py`` as a command-line tool ===================================== When used as a command-line tool, ``f2py`` has...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/f2py/f2py-reference.rst
.. _f2py-reference: F2PY reference manual ===================== .. toctree:: :maxdepth: 2 signature-file python-usage buildtools/index advanced f2py-testing
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/f2py/index.rst
.. _f2py: ===================================== F2PY user guide and reference manual ===================================== The purpose of the ``F2PY`` --*Fortran to Python interface generator*-- utility is to provide a connection between Python and Fortran. F2PY is a part of NumPy_ (``numpy.f2py``) and also available...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/f2py/signature-file.rst
================== Signature file ================== The interface definition file (.pyf) is how you can fine-tune the interface between Python and Fortran. The syntax specification for signature files (``.pyf`` files) is modeled on the Fortran 90/95 language specification. Almost all Fortran 90/95 standard construct...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/f2py/python-usage.rst
================================== Using F2PY bindings in Python ================================== In this page, you can find a full description and a few examples of common usage patterns for F2PY with Python and different argument types. For more examples and use cases, see :ref:`f2py-examples`. Fortran type objec...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/f2py/advanced.rst
======================== Advanced F2PY use cases ======================== Adding user-defined functions to F2PY generated modules ========================================================= User-defined Python C/API functions can be defined inside signature files using ``usercode`` and ``pymethoddef`` statements (they ...
0
public_repos/numpy/doc/source
public_repos/numpy/doc/source/f2py/f2py-user.rst
.. _f2py-user: F2PY user guide =============== .. toctree:: :maxdepth: 2 f2py.getting-started usage f2py-examples
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/windows/conda.rst
.. _f2py-win-conda: ========================= F2PY and Conda on Windows ========================= As a convenience measure, we will additionally assume the existence of ``scoop``, which can be used to install tools without administrative access. .. code-block:: powershell Invoke-Expression (New-Object System.Net....
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/windows/pgi.rst
.. _f2py-win-pgi: =============================== F2PY and PGI Fortran on Windows =============================== A variant of these are part of the so called "classic" Flang, however, as classic Flang requires a custom LLVM and compilation from sources. .. warning:: Since the proprietary compilers are no longer ...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/windows/index.rst
.. _f2py-windows: ================= F2PY and Windows ================= .. warning:: F2PY support for Windows is not always at par with Linux support .. note:: `ScPy's documentation`_ has some information on system-level dependencies which are well tested for Fortran as well. Broadly speaking, there are two ...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/windows/intel.rst
.. _f2py-win-intel: ============================== F2PY and Windows Intel Fortran ============================== As of NumPy 1.23, only the classic Intel compilers (``ifort``) are supported. .. note:: The licensing restrictions for beta software `have been relaxed`_ during the transition to the LLVM backed ``ifx/...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/windows/msys2.rst
.. _f2py-win-msys2: =========================== F2PY and Windows with MSYS2 =========================== Follow the standard `installation instructions`_. Then, to grab the requisite Fortran compiler with ``MVSC``: .. code-block:: bash # Assuming a fresh install pacman -Syu # Restart the terminal pacman -Su...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/ftype.f
C FILE: FTYPE.F SUBROUTINE FOO(N) INTEGER N Cf2py integer optional,intent(in) :: n = 13 REAL A,X COMMON /DATA/ A,X(3) C PRINT*, "IN FOO: N=",N," A=",A," X=[",X(1),X(2),X(3),"]" END C END OF FTYPE.F
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/moddata.f90
module mod integer i integer :: x(4) real, dimension(2,3) :: a real, allocatable, dimension(:,:) :: b contains subroutine foo integer k print*, "i=",i print*, "x=[",x,"]" print*, "a=[" print*, "[",a(1,1),",",a(1,2),",",a(1,3),"]" print*, "[",a(2,1),",",a(2,2),",",a(2,3),"]" print*...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/add-test.f
subroutine addb(k) real(8), intent(inout) :: k(:) k=k+1 endsubroutine subroutine addc(w,k) real(8), intent(in) :: w(:) real(8), intent(out) :: k(size(w)) k=w+1 endsubroutine
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/callback2.pyf
! -*- f90 -*- python module __user__routines interface function fun(i) result (r) integer :: i real*8 :: r end function fun end interface end python module __user__routines python module callback2 interface subroutine foo(f,r) use __user__rout...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/meson_upd.build
project('f2py_examples', 'c', version : '0.1', license: 'BSD-3', meson_version: '>=0.64.0', default_options : ['warning_level=2'], ) add_languages('fortran') py_mod = import('python') py = py_mod.find_installation(pure: false) py_dep = py.dependency() incdir_numpy = run_command(py, ['-c', 'import os; os.ch...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/fib1.f
C FILE: FIB1.F SUBROUTINE FIB(A,N) C C CALCULATE FIRST N FIBONACCI NUMBERS C INTEGER N REAL*8 A(N) DO I=1,N IF (I.EQ.1) THEN A(I) = 0.0D0 ELSEIF (I.EQ.2) THEN A(I) = 1.0D0 ELSE A(I) = A(I-1) + A(I-2) ENDIF ENDDO ...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/CMakeLists_skbuild.txt
### setup project ### cmake_minimum_required(VERSION 3.9) project(fibby VERSION 1.0 DESCRIPTION "FIB module" LANGUAGES C Fortran ) # Safety net if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) message( FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directo...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/setup_example.py
from numpy.distutils.core import Extension ext1 = Extension(name = 'scalar', sources = ['scalar.f']) ext2 = Extension(name = 'fib2', sources = ['fib2.pyf', 'fib1.f']) if __name__ == "__main__": from numpy.distutils.core import setup setup(name = 'f2py_example', desc...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/meson.build
project('f2py_examples', 'c', version : '0.1', license: 'BSD-3', meson_version: '>=0.64.0', default_options : ['warning_level=2'], ) add_languages('fortran') py_mod = import('python') py = py_mod.find_installation(pure: false) py_dep = py.dependency() incdir_numpy = run_command(py, ['-c', 'import os; os.ch...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/fib3.f
C FILE: FIB3.F SUBROUTINE FIB(A,N) C C CALCULATE FIRST N FIBONACCI NUMBERS C INTEGER N REAL*8 A(N) Cf2py intent(in) n Cf2py intent(out) a Cf2py depend(n) a DO I=1,N IF (I.EQ.1) THEN A(I) = 0.0D0 ELSEIF (I.EQ.2) THEN A(I) = 1.0D0 ELSE ...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/fib1.pyf
! -*- f90 -*- python module fib2 ! in interface ! in :fib2 subroutine fib(a,n) ! in :fib2:fib1.f real*8 dimension(n) :: a integer optional,check(len(a)>=n),depend(a) :: n=len(a) end subroutine fib end interface end python module fib2 ! This file was auto-generated ...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/setup_skbuild.py
from skbuild import setup setup( name="fibby", version="0.0.1", description="a minimal example package (fortran version)", license="MIT", packages=['fibby'], python_requires=">=3.7", )
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/allocarr.f90
module mod real, allocatable, dimension(:,:) :: b contains subroutine foo integer k if (allocated(b)) then print*, "b=[" do k = 1,size(b,1) print*, b(k,1:size(b,2)) enddo print*, "]" else print*, "b is not allocated" endif end subroutine foo end module...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/myroutine.pyf
! -*- f90 -*- ! Note: the context of this file is case sensitive. python module myroutine ! in interface ! in :myroutine subroutine s(n,m,c,x) ! in :myroutine:myroutine.f90 integer intent(in) :: n integer intent(in) :: m real(kind=8) dimension(:),intent(in) :: c ...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/add-improved.f
C SUBROUTINE ZADD(A,B,C,N) C CF2PY INTENT(OUT) :: C CF2PY INTENT(HIDE) :: N CF2PY DOUBLE COMPLEX :: A(N) CF2PY DOUBLE COMPLEX :: B(N) CF2PY DOUBLE COMPLEX :: C(N) DOUBLE COMPLEX A(*) DOUBLE COMPLEX B(*) DOUBLE COMPLEX C(*) INTEGER N DO 20 J = 1, N C(J) = A(J) + B(J) 20 CO...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/add.pyf
subroutine zadd(a,b,c,n) ! in :add:add.f double complex dimension(*) :: a double complex dimension(*) :: b double complex dimension(*) :: c integer :: n end subroutine zadd
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/scalar.f
C FILE: SCALAR.F SUBROUTINE FOO(A,B) REAL*8 A, B Cf2py intent(in) a Cf2py intent(inout) b PRINT*, " A=",A," B=",B PRINT*, "INCREMENT A AND B" A = A + 1D0 B = B + 1D0 PRINT*, "NEW A=",A," B=",B END C END OF FILE SCALAR.F
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/var.pyf
! -*- f90 -*- python module var usercode ''' int BAR = 5; ''' interface usercode ''' PyDict_SetItemString(d,"BAR",PyInt_FromLong(BAR)); ''' end interface end python module
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/extcallback.f
subroutine f1() print *, "in f1, calling f2 twice.." call f2() call f2() return end subroutine f2() cf2py intent(callback, hide) fpy external fpy print *, "in f2, calling f2py.." call fpy() return end
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/fib2.pyf
! -*- f90 -*- python module fib2 interface subroutine fib(a,n) real*8 dimension(n),intent(out),depend(n) :: a integer intent(in) :: n end subroutine fib end interface end python module fib2
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/spam.pyf
! -*- f90 -*- python module spam usercode ''' static char doc_spam_system[] = "Execute a shell command."; static PyObject *spam_system(PyObject *self, PyObject *args) { char *command; int sts; if (!PyArg_ParseTuple(args, "s", &command)) return NULL; sts = system(command); retur...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/common.f
C FILE: COMMON.F SUBROUTINE FOO INTEGER I,X REAL A COMMON /DATA/ I,X(4),A(2,3) PRINT*, "I=",I PRINT*, "X=[",X,"]" PRINT*, "A=[" PRINT*, "[",A(1,1),",",A(1,2),",",A(1,3),"]" PRINT*, "[",A(2,1),",",A(2,2),",",A(2,3),"]" PRINT*, "]" END C END OF COMMON.F
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/asterisk1.f90
subroutine foo1(s) character*(*), intent(out) :: s !f2py character(f2py_len=12) s s = "123456789A12" end subroutine foo1
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/asterisk2.f90
subroutine foo2(s, n) character(len=*), intent(out) :: s integer, intent(in) :: n !f2py character(f2py_len=n), depend(n) :: s s = "123456789A123456789B"(1:n) end subroutine foo2
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/string.f
C FILE: STRING.F SUBROUTINE FOO(A,B,C,D) CHARACTER*5 A, B CHARACTER*(*) C,D Cf2py intent(in) a,c Cf2py intent(inout) b,d PRINT*, "A=",A PRINT*, "B=",B PRINT*, "C=",C PRINT*, "D=",D PRINT*, "CHANGE A,B,C,D" A(1:1) = 'A' B(1:1) = 'B' C(1:1) = 'C' D(1...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/CMakeLists.txt
cmake_minimum_required(VERSION 3.18) # Needed to avoid requiring embedded Python libs too project(fibby VERSION 1.0 DESCRIPTION "FIB module" LANGUAGES C Fortran ) # Safety net if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) message( FATAL_ERROR "In-source builds not allowed. Please make a new dir...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/array.f
C FILE: ARRAY.F SUBROUTINE FOO(A,N,M) C C INCREMENT THE FIRST ROW AND DECREMENT THE FIRST COLUMN OF A C INTEGER N,M,I,J REAL*8 A(N,M) Cf2py intent(in,out,copy) a Cf2py integer intent(hide),depend(a) :: n=shape(a,0), m=shape(a,1) DO J=1,M A(1,J) = A(1,J) + 1D0 ENDDO DO I=...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/myroutine-edited.pyf
! -*- f90 -*- ! Note: the context of this file is case sensitive. python module myroutine ! in interface ! in :myroutine subroutine s(n,m,c,x) ! in :myroutine:myroutine.f90 integer intent(in) :: n integer intent(in) :: m real(kind=8) dimension(:),intent(in) :: c ...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/f2cmap_demo.f
subroutine func1(n, x, res) use, intrinsic :: iso_fortran_env, only: int64, real64 implicit none integer(int64), intent(in) :: n real(real64), intent(in) :: x(n) real(real64), intent(out) :: res Cf2py intent(hide) :: n res = sum(x) end
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/add.f
C SUBROUTINE ZADD(A,B,C,N) C DOUBLE COMPLEX A(*) DOUBLE COMPLEX B(*) DOUBLE COMPLEX C(*) INTEGER N DO 20 J = 1, N C(J) = A(J)+B(J) 20 CONTINUE END
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/add-edited.pyf
subroutine zadd(a,b,c,n) ! in :add:add.f double complex dimension(n) :: a double complex dimension(n) :: b double complex intent(out),dimension(n) :: c integer intent(hide),depend(a) :: n=len(a) end subroutine zadd
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/callback.f
C FILE: CALLBACK.F SUBROUTINE FOO(FUN,R) EXTERNAL FUN INTEGER I REAL*8 R, FUN Cf2py intent(out) r R = 0D0 DO I=-5,5 R = R + FUN(I) ENDDO END C END OF FILE CALLBACK.F
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/filter.f
C SUBROUTINE DFILTER2D(A,B,M,N) C DOUBLE PRECISION A(M,N) DOUBLE PRECISION B(M,N) INTEGER N, M CF2PY INTENT(OUT) :: B CF2PY INTENT(HIDE) :: N CF2PY INTENT(HIDE) :: M DO 20 I = 2,M-1 DO 40 J = 2,N-1 B(I,J) = A(I,J) + & (A(I-1,J)+A(I+1,J) + & ...
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/calculate.f
subroutine calculate(x,n) cf2py intent(callback) func external func c The following lines define the signature of func for F2PY: cf2py real*8 y cf2py y = func(y) c cf2py intent(in,out,copy) x integer n,i real*8 x(n), func do i=1,n x(i) = func(x(i)) end do end
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/pyproj_skbuild.toml
[build-system] requires = ["setuptools>=42", "wheel", "scikit-build", "cmake>=3.9", "numpy>=1.21"] build-backend = "setuptools.build_meta"
0
public_repos/numpy/doc/source/f2py
public_repos/numpy/doc/source/f2py/code/myroutine.f90
subroutine s(n, m, c, x) implicit none integer, intent(in) :: n, m real(kind=8), intent(out), dimension(n,m) :: x real(kind=8), intent(in) :: c(:) x = 0.0d0 x(1, 1) = c(1) end subroutine s
0