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-refactor/numpy/f2py/src
public_repos/numpy-refactor/numpy/f2py/src/test/foo90.f90
subroutine foo() integer a real*8 b,c(3) common /foodata/ a,b,c print*, " F: in foo" a = 5 b = 6.3 c(2) = 9.1 end subroutine foo
0
public_repos/numpy-refactor/numpy/f2py/src
public_repos/numpy-refactor/numpy/f2py/src/test/wrap.f
subroutine f2py_mod_get_dims(f2py_r,f2py_s,f2py_set,f2py_n) use mod external f2py_set logical f2py_ns integer f2py_s(*),f2py_r,f2py_i,f2py_j character*(*) f2py_n if ("d".eq.f2py_n) then f2py_ns = .FALSE. if (allocated(d)) then do f2py_i=1,f2py_r ...
0
public_repos/numpy-refactor/numpy/f2py/src
public_repos/numpy-refactor/numpy/f2py/src/test/foo.f
subroutine bar() integer a real*8 b,c(3) common /foodata/ a,b,c a = 4 b = 6.7 c(2) = 3.0 write(*,*) "bar:a=",a write(*,*) "bar:b=",b write(*,*) "bar:c=",c end
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/f2py2e.tex
\documentclass{article} \usepackage{a4wide} \input commands \title{\fpy\\Fortran to Python Interface Generator\\{\large Second Edition}} \author{Pearu Peterson \texttt{<pearu@ioc.ee>}} \date{$Revision: 1.16 $\\\today} \begin{document} \special{html: <font size=-1>If equations does not show Greek letters or large...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/signaturefile.tex
\section{Signature file} \label{sec:signaturefile} The syntax of a signature file is borrowed from the Fortran~90/95 language specification. Almost all Fortran~90/95 standard constructs are understood. Recall that Fortran~77 is a subset of Fortran~90/95. This tool introduces also some new attributes that are used for...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/oldnews.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <HTML> <HEAD> <META name="Author" content="Pearu Peterson"> <!-- You may add here some keywords (comma separeted list) --> <META name="Keywords" content="fortran,python,interface,f2py,f2py2e,wrapper,fpig"> <TITLE>...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/intro.tex
\section{Introduction} \label{sec:intro} \fpy is a command line tool that generates Python C/API modules for interfacing Fortran~77/90/95 codes and Fortran~90/95 modules from Python. In general, using \fpy an interface is produced in three steps: \begin{itemize} \item[(i)] \fpy scans Fortran sources and creates the ...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/commands.tex
\usepackage{xspace} \usepackage{verbatim} %%tth:\newcommand{\xspace}{ } \newcommand{\fpy}{\texttt{f2py}\xspace} \newcommand{\bs}{\symbol{`\\}} % need bs here: %%tth:\newcommand{\bs}{\texttt{<backslash>}} \newcommand{\shell}[1]{\hspace*{1em}\texttt{sh> \begin{minipage}[t]{0.8\textwidth}#1\end{minipage}}} %%% Local...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/using_F_compiler.txt
Title: Wrapping F compiled Fortran 90 modules with F2PY ================================================ Rationale: The F compiler does not support external procedures which makes it impossible to use it in F2PY in a normal way. This document describes a workaround to this problem...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/python9.tex
\documentclass[twocolumn]{article} \usepackage{epsfig} \usepackage{xspace} \usepackage{verbatim} \headsep=0pt \topmargin=0pt \headheight=0pt \oddsidemargin=0pt \textwidth=6.5in \textheight=9in %%tth:\newcommand{\xspace}{ } \newcommand{\fpy}{\texttt{f2py}\xspace} \newcommand{\bs}{\symbol{`\\}} % need bs here: %%tth:\n...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/apps.tex
\section{Applications} \label{sec:apps} \subsection{Example: wrapping C library \texttt{fftw}} \label{sec:wrapfftw} Here follows a simple example how to use \fpy to generate a wrapper for C functions. Let us create a FFT code using the functions in FFTW library. I'll assume that the library \texttt{fftw} is configu...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/multiarrays.txt
From pearu@ioc.ee Thu Dec 30 09:58:01 1999 Date: Fri, 26 Nov 1999 12:02:42 +0200 (EET) From: Pearu Peterson <pearu@ioc.ee> To: Users of f2py2e -- Curtis Jensen <cjensen@be-research.ucsd.edu>, Vladimir Janku <vjanku@kvet.sk>, Travis Oliphant <Oliphant.Travis@mayo.edu> Subject: Multidimensional arrays in f2py2e...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/Makefile
# Makefile for compiling f2py2e documentation (dvi, ps, html) # Pearu Peterson <pearu@ioc.ee> REL=4 TOP = usersguide LATEXSRC = bugs.tex commands.tex f2py2e.tex intro.tex notes.tex signaturefile.tex MAINLATEX = f2py2e LATEX = latex PDFLATEX = pdflatex COLLECTINPUT = ./collectinput.py INSTALLDATA = install -m 64...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/Release-3.x.txt
F2PY - Fortran to Python Interface Generator I am pleased to announce the third public release of f2py (version 2.3.321): http://cens.ioc.ee/projects/f2py2e/ f2py is a command line tool for binding Python and Fortran codes. It scans Fortran 77/90/95 codes and generates a Python C/API module that makes it poss...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/Release-1.x.txt
I am pleased to announce the first public release of f2py 1.116: Writing Python C/API wrappers for Fortran routines can be a very tedious task, especially if a Fortran routine takes more than 20 arguments but only few of them are relevant for the problems that they solve. The Fortran to Python Interface Generator, o...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/options.tex
\section{\fpy command line options} \label{sec:opts} \fpy has the following command line syntax (run \fpy without arguments to get up to date options!!!): \begin{verbatim} f2py [<options>] <fortran files> [[[only:]||[skip:]] <fortran functions> ]\ [: <fortran files> ...] \end{verbatim} where \begin{...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/Release-4.x.txt
F2PY - Fortran to Python Interface Generator I am pleased to announce the fourth public release of f2py (version 2.4.366): http://cens.ioc.ee/projects/f2py2e/ f2py is a command line tool for binding Python and Fortran codes. It scans Fortran 77/90/95 codes and generates a Python C/API module that makes it pos...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/index.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <HTML> <HEAD> <META name="Author" content="Pearu Peterson"> <!-- You may add here some keywords (comma separeted list) --> <META name="Keywords" content="fortran,python,interface,f2py,f2py2e,wrapper,fpig"> <TITLE>...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/Release-2.x.txt
FPIG - Fortran to Python Interface Generator I am pleased to announce the second public release of f2py (version 2.264): http://cens.ioc.ee/projects/f2py2e/ f2py is a command line tool for binding Python and Fortran codes. It scans Fortran 77/90/95 codes and generates a Python C/API module that makes it possi...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/notes.tex
\section{Calling wrapper functions from Python} \label{sec:notes} \subsection{Scalar arguments} \label{sec:scalars} In general, for scalar argument you can pass in in addition to ordinary Python scalars (like integers, floats, complex values) also arbitrary sequence objects (lists, arrays, strings) --- then the firs...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/win32_notes.txt
The following notes are from Eric Jones. My Setup: For Python/Fortran development, I run Windows 2000 and use the mingw32 (www.mingw.org) set of gcc/g77 compilers and tools (gcc 2.95.2) to build python extensions. I'll also ocassionally use MSVC for extension development, but rarely on projects that include Fortran ...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/bugs.tex
\section{Bugs, Plans, and Feedback} \label{sec:bugs} Currently no bugs have found that I was not able to fix. I will be happy to receive bug reports from you (so that I could fix them and keep the first sentence of this paragraph as true as possible ;-). Note that \fpy is developed to work properly with gcc/g77 comp...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/fortranobject.tex
\documentclass{article} \headsep=0pt \topmargin=0pt \headheight=0pt \oddsidemargin=0pt \textwidth=6.5in \textheight=9in \usepackage{xspace} \usepackage{verbatim} \newcommand{\fpy}{\texttt{f2py}\xspace} \newcommand{\bs}{\symbol{`\\}} \newcommand{\email}[1]{\special{html:<A href="mailto:#1">}\texttt{<#1>}\special{html:...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/doc/collectinput.py
#!/usr/bin/env python """ collectinput - Collects all files that are included to a main Latex document with \input or \include commands. These commands must be in separate lines. Copyright 1999 Pearu Peterson all rights reserved, Pearu Peterson <pearu@ioc.ee> Permission to use, modify, an...
0
public_repos/numpy-refactor/numpy/f2py/doc
public_repos/numpy-refactor/numpy/f2py/doc/f2python9-final/README.txt
This directory contains the source of the paper "Fortran to Python Interface Generator with an Application to Aerospace Engineering" by Pearu Peterson <pearu@cens.ioc.ee> (the corresponding author) Joaquim R. R. A. Martins <joaquim.martins@stanford.edu> Juan J. Alonso <jjalonso@stanford.edu>...
0
public_repos/numpy-refactor/numpy/f2py/doc
public_repos/numpy-refactor/numpy/f2py/doc/f2python9-final/mk_pdf.sh
#!/bin/sh cd src test -f aerostructure.pdf || convert ../aerostructure.jpg aerostructure.pdf test -f flow.pdf || convert ../flow.jpg flow.pdf test -f structure.pdf || convert ../structure.jpg structure.pdf cat python9.tex | sed -e "s/eps,/pdf,/g" > python9pdf.tex pdflatex python9pdf.tex pdflatex python9pdf.tex pdfla...
0
public_repos/numpy-refactor/numpy/f2py/doc
public_repos/numpy-refactor/numpy/f2py/doc/f2python9-final/mk_ps.sh
#!/bin/sh cd src test -f aerostructure.eps || convert ../aerostructure.jpg aerostructure.eps test -f flow.eps || convert ../flow.jpg flow.eps test -f structure.eps || convert ../structure.jpg structure.eps latex python9.tex latex python9.tex latex python9.tex dvips python9.dvi -o ../f2python9.ps cd .. gzip -f f2pyt...
0
public_repos/numpy-refactor/numpy/f2py/doc
public_repos/numpy-refactor/numpy/f2py/doc/f2python9-final/mk_html.sh
#!/bin/sh cd src test -f aerostructure.eps || convert ../aerostructure.jpg aerostructure.eps test -f flow.eps || convert ../flow.jpg flow.eps test -f structure.eps || convert ../structure.jpg structure.eps latex python9.tex latex python9.tex latex python9.tex test `which tth` && cat python9.tex | sed -e "s/{{}\\\ve...
0
public_repos/numpy-refactor/numpy/f2py/doc/f2python9-final/src
public_repos/numpy-refactor/numpy/f2py/doc/f2python9-final/src/examples/foom.pyf
!%f90 -*- f90 -*- python module foo interface subroutine exp1(l,u,n) real*8 dimension(2) :: l real*8 dimension(2) :: u intent(out) l,u integer*4 optional :: n = 1 end subroutine exp1 end interface end python module foo ! This file was auto-generat...
0
public_repos/numpy-refactor/numpy/f2py/doc/f2python9-final/src
public_repos/numpy-refactor/numpy/f2py/doc/f2python9-final/src/examples/foo.pyf
!%f90 -*- f90 -*- python module foo interface subroutine exp1(l,u,n) real*8 dimension(2) :: l real*8 dimension(2) :: u integer*4 :: n end subroutine exp1 end interface end python module foo ! This file was auto-generated with f2py ! (version:2.298). ! See ht...
0
public_repos/numpy-refactor/numpy/f2py/doc/f2python9-final/src
public_repos/numpy-refactor/numpy/f2py/doc/f2python9-final/src/examples/exp1mess.txt
Reading fortran codes... Reading file 'exp1.f' Post-processing... Block: foo Block: exp1 Creating 'Makefile-foo'... Linker: ld ('GNU ld' 2.9.5) Fortran compiler: f77 ('g77 2.x.x' 2.95.2) C compiler: cc ('gcc 2.x.x' 2.95.2) Building modules... Building module "foo"... Constructing wrapper...
0
public_repos/numpy-refactor/numpy/f2py/doc/f2python9-final/src
public_repos/numpy-refactor/numpy/f2py/doc/f2python9-final/src/examples/exp1session.txt
>>> import foo,Numeric >>> print foo.exp1.__doc__ exp1 - Function signature: l,u = exp1([n]) Optional arguments: n := 1 input int Return objects: l : rank-1 array('d') with bounds (2) u : rank-1 array('d') with bounds (2) >>> l,u = foo.exp1() >>> print l,u [ 1264. 465.] [ 1457. 536.] >>> print l[0]/l[1], u...
0
public_repos/numpy-refactor/numpy/f2py/doc/f2python9-final/src
public_repos/numpy-refactor/numpy/f2py/doc/f2python9-final/src/examples/exp1.f
subroutine exp1(l,u,n) C Input: n is number of iterations C Output: l,u are such that C l(1)/l(2) < exp(1) < u(1)/u(2) C Cf2py integer*4 :: n = 1 Cf2py intent(out) l,u integer*4 n,i real*8 l(2),u(2),t,t1,t2,t3,t4 l(2) = 1 l(1) = 0 u(2) = 0 u(1) = 1 do 10 i=0...
0
public_repos/numpy-refactor/numpy/f2py/doc
public_repos/numpy-refactor/numpy/f2py/doc/ex1/foobarmodule.tex
% This file is auto-generated with f2py (version:2.266) \section{Module \texttt{foobar}} This module contains two examples that are used in \texttt{f2py} documentation. \subsection{Wrapper function \texttt{foo}} \noindent{{}\verb@foo@{}}\texttt{(a)} --- Example of a wrapper function of a Fortran subroutine. ...
0
public_repos/numpy-refactor/numpy/f2py/doc
public_repos/numpy-refactor/numpy/f2py/doc/ex1/bar.f
function bar(a,b) integer a,b,bar bar = a + b end
0
public_repos/numpy-refactor/numpy/f2py/doc
public_repos/numpy-refactor/numpy/f2py/doc/ex1/arr.f
subroutine arr(l,m,n,a) integer l,m,n real*8 a(l,m,n) end
0
public_repos/numpy-refactor/numpy/f2py/doc
public_repos/numpy-refactor/numpy/f2py/doc/ex1/runme
#!/bin/sh f2py2e='python ../../f2py2e.py' PYINC=`$f2py2e -pyinc` $f2py2e foobar-smart.pyf --short-latex --overwrite-makefile -makefile foo.f bar.f gmake -f Makefile-foobar #gcc -O3 -I$PYINC -I$PYINC/Numeric -shared -o foobarmodule.so foobarmodule.c foo.f bar.f python -c ' import foobar print foobar.__doc__ print fooba...
0
public_repos/numpy-refactor/numpy/f2py/doc
public_repos/numpy-refactor/numpy/f2py/doc/ex1/foobar-smart.f90
!%f90 module foobar ! in note(This module contains two examples that are used in & \texttt{f2py} documentation.) foobar interface ! in :foobar subroutine foo(a) ! in :foobar:foo.f note(Example of a wrapper function of a Fortran subroutine.) foo integer intent(inout),& ...
0
public_repos/numpy-refactor/numpy/f2py/doc
public_repos/numpy-refactor/numpy/f2py/doc/ex1/foobar.f90
!%f90 module foobar ! in interface ! in :foobar subroutine foo(a) ! in :foobar:foo.f integer intent(inout) :: a end subroutine foo function bar(a,b) ! in :foobar:bar.f integer :: a integer :: b integer :: bar end function bar end ...
0
public_repos/numpy-refactor/numpy/f2py/doc
public_repos/numpy-refactor/numpy/f2py/doc/ex1/foo.f
subroutine foo(a) integer a cf2py intent(in,out) :: a a = a + 5 end
0
public_repos/numpy-refactor/numpy/f2py/doc
public_repos/numpy-refactor/numpy/f2py/doc/multiarray/fortran_array_from_pyobj.txt
_____________________________________________________________ / Proposed internal structure for f2py generated extension \ < modules regarding the issues with different storage-orders > \ of multi-dimensional matrices in Fortran and C. / ===============================================...
0
public_repos/numpy-refactor/numpy/f2py/doc
public_repos/numpy-refactor/numpy/f2py/doc/multiarray/run.pyf
!%f90 -*- f90 -*- ! Example: ! Using f2py for wrapping multi-dimensional Fortran and C arrays ! [OLD APPROACH, do not use it with f2py higher than 2.8.x] ! $Id: run.pyf,v 1.1 2002/01/14 15:49:46 pearu Exp $ ! Usage (with gcc compiler): ! f2py -c run.pyf foo.f bar.c -DNO_APPEND_FORTRAN python module run ! i...
0
public_repos/numpy-refactor/numpy/f2py/doc
public_repos/numpy-refactor/numpy/f2py/doc/multiarray/fun.pyf
!%f90 -*- f90 -*- ! Example: ! Using f2py for wrapping multi-dimensional Fortran and C arrays ! [NEW APPROACH, use it with f2py higher than 2.8.x] ! $Id: fun.pyf,v 1.3 2002/01/18 10:06:50 pearu Exp $ ! Usage (with gcc compiler): ! f2py -c fun.pyf foo.f bar.c python module fun ! in interface ! in :fun...
0
public_repos/numpy-refactor/numpy/f2py/doc
public_repos/numpy-refactor/numpy/f2py/doc/multiarray/bar.c
#include <stdio.h> void bar(int *a,int m,int n) { int i,j; printf("C:"); printf("m=%d, n=%d\n",m,n); for (i=0;i<m;++i) { printf("Row %d:\n",i+1); for (j=0;j<n;++j) printf("a(i=%d,j=%d)=%d\n",i,j,a[n*i+j]); } if (m*n) a[0] = 7777; }
0
public_repos/numpy-refactor/numpy/f2py/doc
public_repos/numpy-refactor/numpy/f2py/doc/multiarray/transpose.txt
From: Phil Garner (garner@signal.dra.hmg.gb) Subject: In place matrix transpose Newsgroups: sci.math.num-analysis Date: 1993-08-05 06:35:06 PST Someone was talking about matrix transposes earlier on. It's a curious subject. I found that an in-place transpose is about 12 times slower than the trivial copying me...
0
public_repos/numpy-refactor/numpy/f2py/doc
public_repos/numpy-refactor/numpy/f2py/doc/multiarray/array_from_pyobj.c
/* * File: array_from_pyobj.c * * Description: * ------------ * Provides array_from_pyobj function that returns a contigious array * object with the given dimensions and required storage order, either * in row-major (C) or column-major (Fortran) order. The function * array_from_pyobj is very flexible about i...
0
public_repos/numpy-refactor/numpy/f2py/doc
public_repos/numpy-refactor/numpy/f2py/doc/multiarray/foo.f
subroutine foo(a,m,n) integer a(m,n), m,n,i,j print*, "F77:" print*, "m=",m,", n=",n do 100,i=1,m print*, "Row ",i,":" do 50,j=1,n print*, "a(i=",i,",j=",j,") = ",a(i,j) 50 continue 100 continue if (m*n.gt.0) a(1,1) = 77777 end
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/tests/test_array_from_pyobj.py
import unittest import os import sys import copy import nose from numpy.testing import * from numpy import array, alltrue, ndarray, asarray, can_cast,zeros, dtype from numpy.core.multiarray import typeinfo import util wrap = None def setup(): """ Build the required testing extension module """ glob...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/tests/test_return_complex.py
from numpy.testing import * from numpy import array import util class TestReturnComplex(util.F2PyTest): def check_function(self, t): tname = t.__doc__.split()[0] if tname in ['t0','t8','s0','s8']: err = 1e-5 else: err = 0.0 assert abs(t(234j)-234.0j)<=err ...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/tests/test_return_integer.py
from numpy.testing import * from numpy import array import util class TestReturnInteger(util.F2PyTest): def check_function(self, t): assert t(123)==123,`t(123)` assert t(123.6)==123 assert t(123l)==123 assert t('123')==123 assert t(-123)==-123 assert t([123])==123 ...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/tests/test_callback.py
from numpy.testing import * from numpy import array import math import util class TestF77Callback(util.F2PyTest): code = """ subroutine t(fun,a) integer a cf2py intent(out) a external fun call fun(a) end subroutine func(a) cf2py intent(in,out) a integer a ...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/tests/test_return_character.py
from numpy.testing import * from numpy import array from numpy.compat import asbytes import util class TestReturnCharacter(util.F2PyTest): def check_function(self, t): tname = t.__doc__.split()[0] if tname in ['t0','t1','s0','s1']: assert t(23)==asbytes('2') r = t('ab');asse...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/tests/util.py
""" Utility functions for - building and importing modules on test time, using a temporary location - detecting if compilers are present """ import os import sys import subprocess import tempfile import shutil import atexit import textwrap import re import random import nose from numpy.compat import asbytes, asstr...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/tests/test_return_real.py
from numpy.testing import * from numpy import array import math import util class TestReturnReal(util.F2PyTest): def check_function(self, t): if t.__doc__.split()[0] in ['t0','t4','s0','s4']: err = 1e-5 else: err = 0.0 assert abs(t(234)-234.0)<=err assert abs...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/tests/test_return_logical.py
from numpy.testing import * from numpy import array import util class TestReturnLogical(util.F2PyTest): def check_function(self, t): assert t(True)==1,`t(True)` assert t(False)==0,`t(False)` assert t(0)==0 assert t(None)==0 assert t(0.0)==0 assert t(0j)==0 as...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/tests/test_mixed.py
import os import math from numpy.testing import * from numpy import array import util def _path(*a): return os.path.join(*((os.path.dirname(__file__),) + a)) class TestMixed(util.F2PyTest): sources = [_path('src', 'mixed', 'foo.f'), _path('src', 'mixed', 'foo_fixed.f90'), _path...
0
public_repos/numpy-refactor/numpy/f2py/tests/src
public_repos/numpy-refactor/numpy/f2py/tests/src/mixed/foo_fixed.f90
module foo_fixed contains subroutine bar12(a) !f2py intent(out) a integer a a = 12 end subroutine bar12 end module foo_fixed
0
public_repos/numpy-refactor/numpy/f2py/tests/src
public_repos/numpy-refactor/numpy/f2py/tests/src/mixed/foo.f
subroutine bar11(a) cf2py intent(out) a integer a a = 11 end
0
public_repos/numpy-refactor/numpy/f2py/tests/src
public_repos/numpy-refactor/numpy/f2py/tests/src/mixed/foo_free.f90
module foo_free contains subroutine bar13(a) !f2py intent(out) a integer a a = 13 end subroutine bar13 end module foo_free
0
public_repos/numpy-refactor/numpy/f2py/tests/src
public_repos/numpy-refactor/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c
/* File: wrapmodule.c * This file is auto-generated with f2py (version:2_1330). * Hand edited by Pearu. * f2py is a Fortran to Python Interface Generator (FPIG), Second Edition, * written by Pearu Peterson <pearu@cens.ioc.ee>. * See http://cens.ioc.ee/projects/f2py2e/ * Generation date: Fri Oct 21 22:41:12 2005 ...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/docs/pytest.py
#File: pytest.py import Numeric def foo(a): a = Numeric.array(a) m,n = a.shape for i in range(m): for j in range(n): a[i,j] = a[i,j] + 10*(i+1) + (j+1) return a #eof
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/docs/docutils.conf
[general] # These entries affect all processing: #source-link: 1 datestamp: %Y-%m-%d %H:%M UTC generator: 1 # These entries affect HTML output: #stylesheet-path: pearu_style.css output-encoding: latin-1 # These entries affect reStructuredText-style PEPs: #pep-template: pep-html-template #pep-stylesheet-path: stylesh...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/docs/OLDNEWS.txt
.. topic:: Old F2PY NEWS March 30, 2004 F2PY bug fix release (version 2.39.235-1693). Two new command line switches: ``--compiler`` and ``--include_paths``. Support for allocatable string arrays. Callback arguments may now be arbitrary callable objects. Win32 installers for F2PY and Scipy_core are p...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/docs/simple.f
cFile: simple.f subroutine foo(a,m,n) integer m,n,i,j real a(m,n) cf2py intent(in,out) a cf2py intent(hide) m,n do i=1,m do j=1,n a(i,j) = a(i,j) + 10*i+j enddo enddo end cEOF
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/docs/pyforttest.pyf
subroutine foo(a,m,n) integer m = size(a,1) integer n = size(a,2) real, intent(inout) :: a(m,n) end subroutine foo
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/docs/simple_session.dat
>>> import pytest >>> import f2pytest >>> import pyforttest >>> print f2pytest.foo.__doc__ foo - Function signature: a = foo(a) Required arguments: a : input rank-2 array('f') with bounds (m,n) Return objects: a : rank-2 array('f') with bounds (m,n) >>> print pyforttest.foo.__doc__ foo(a) >>> pytest.foo([[1,2],...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/docs/TESTING.txt
======================================================= F2PY unit testing site ======================================================= .. Contents:: Tests ----- * To run all F2PY unit tests in one command:: cd tests python run_all.py [<options>] For example:: localhost:~/src_cvs/f...
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/docs/hello.f
C File hello.f subroutine foo (a) integer a print*, "Hello from Fortran!" print*, "a=",a end
0
public_repos/numpy-refactor/numpy/f2py
public_repos/numpy-refactor/numpy/f2py/docs/default.css
/* :Author: David Goodger :Contact: goodger@users.sourceforge.net :date: $Date: 2002/08/01 20:52:44 $ :version: $Revision: 1.1 $ :copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. */ body { background: #FFFFFF ; color: #000000 } a.foot...
0
public_repos/numpy-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/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) PRINT*, "IN FOO: N=",N," A=",A," X=[",X(1),X(2),X(3),"]" END C END OF FTYPE.F
0
public_repos/numpy-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/array_session.dat
>>> import arr >>> from Numeric import array >>> print arr.foo.__doc__ foo - Function signature: a = foo(a,[overwrite_a]) Required arguments: a : input rank-2 array('d') with bounds (n,m) Optional arguments: overwrite_a := 0 input int Return objects: a : rank-2 array('d') with bounds (n,m) >>> a=arr.foo([[1,2,...
0
public_repos/numpy-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/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-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/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-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/docutils.conf
[general] # These entries affect all processing: #source-link: 1 datestamp: %Y-%m-%d %H:%M UTC generator: 1 # These entries affect HTML output: #stylesheet-path: f2py_style.css output-encoding: latin-1 # These entries affect reStructuredText-style PEPs: #pep-template: pep-html-template #pep-stylesheet-path: styleshe...
0
public_repos/numpy-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/ftype_session.dat
>>> import ftype >>> print ftype.__doc__ This module 'ftype' is auto-generated with f2py (version:2.28.198-1366). Functions: foo(n=13) COMMON blocks: /data/ a,x(3) . >>> type(ftype.foo),type(ftype.data) (<type 'fortran'>, <type 'fortran'>) >>> ftype.foo() IN FOO: N= 13 A= 0. X=[ 0. 0. 0.] >>> ftype.data.a = 3 ...
0
public_repos/numpy-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/compile_session.dat
>>> import f2py2e >>> fsource = ''' ... subroutine foo ... print*, "Hello world!" ... end ... ''' >>> f2py2e.compile(fsource,modulename='hello',verbose=0) 0 >>> import hello >>> hello.foo() Hello world!
0
public_repos/numpy-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/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-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/setup_example.py
#!/usr/bin/env python # File: 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 ...
0
public_repos/numpy-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/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-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/extcallback_session.dat
>>> import pfromf >>> pfromf.f2() Traceback (most recent call last): File "<stdin>", line 1, in ? pfromf.error: Callback fpy not defined (as an argument or module pfromf attribute). >>> def f(): print "python f" ... >>> pfromf.fpy = f >>> pfromf.f2() in f2, calling f2py.. python f >>> pfromf.f1() in f1, calling f...
0
public_repos/numpy-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/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-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/common_session.dat
>>> import common >>> print common.data.__doc__ i - 'i'-scalar x - 'i'-array(4) a - 'f'-array(2,3) >>> common.data.i = 5 >>> common.data.x[1] = 2 >>> common.data.a = [[1,2,3],[4,5,6]] >>> common.foo() I= 5 X=[ 0 2 0 0] A=[ [ 1., 2., 3.] [ 4., 5., 6.] ] >>> common.data.a[1] = 45 >>> common.foo() I= 5 X=[...
0
public_repos/numpy-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/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-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/var_session.dat
>>> import var >>> var.BAR 5
0
public_repos/numpy-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/scalar_session.dat
>>> import scalar >>> print scalar.foo.__doc__ foo - Function signature: foo(a,b) Required arguments: a : input float b : in/output rank-0 array(float,'d') >>> scalar.foo(2,3) A= 2. B= 3. INCREMENT A AND B NEW A= 3. B= 4. >>> import Numeric >>> a=Numeric.array(2) # these are integer rank-0 array...
0
public_repos/numpy-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/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-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/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-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/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-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/spam_session.dat
>>> import spam >>> status = spam.system('whoami') pearu >> status = spam.system('blah') sh: line 1: blah: command not found
0
public_repos/numpy-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/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-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/index.txt
.. -*- rest -*- ////////////////////////////////////////////////////////////////////// F2PY Users Guide and Reference Manual ////////////////////////////////////////////////////////////////////// :Author: Pearu Peterson :Contact: pearu@cens.ioc.ee :Web site: http://cens.ioc.ee/projects/f2py2e/ :Dat...
0
public_repos/numpy-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/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-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/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-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/moddata_session.dat
>>> import moddata >>> print moddata.mod.__doc__ i - 'i'-scalar x - 'i'-array(4) a - 'f'-array(2,3) foo - Function signature: foo() >>> moddata.mod.i = 5 >>> moddata.mod.x[:2] = [1,2] >>> moddata.mod.a = [[1,2,3],[4,5,6]] >>> moddata.mod.foo() i= 5 x=[ 1 2 ...
0
public_repos/numpy-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/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-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/allocarr_session.dat
>>> import allocarr >>> print allocarr.mod.__doc__ b - 'f'-array(-1,-1), not allocated foo - Function signature: foo() >>> allocarr.mod.foo() b is not allocated >>> allocarr.mod.b = [[1,2,3],[4,5,6]] # allocate/initialize b >>> allocarr.mod.foo() b=[ 1.000000 2.000000 3.000000 4.00...
0
public_repos/numpy-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/callback_session.dat
>>> import callback >>> print callback.foo.__doc__ foo - Function signature: r = foo(fun,[fun_extra_args]) Required arguments: fun : call-back function Optional arguments: fun_extra_args := () input tuple Return objects: r : float Call-back functions: def fun(i): return r Required arguments: i : input i...
0
public_repos/numpy-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/run_main_session.dat
>>> import f2py2e >>> r=f2py2e.run_main(['-m','scalar','docs/usersguide/scalar.f']) Reading fortran codes... Reading file 'docs/usersguide/scalar.f' Post-processing... Block: scalar Block: FOO Building modules... Building module "scalar"... Wrote C/API module "sca...
0
public_repos/numpy-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/calculate_session.dat
>>> import foo >>> foo.calculate(range(5), lambda x: x*x) array([ 0., 1., 4., 9., 16.]) >>> import math >>> foo.calculate(range(5), math.exp) array([ 1. , 2.71828175, 7.38905621, 20.08553696, 54.59814835])
0
public_repos/numpy-refactor/numpy/f2py/docs
public_repos/numpy-refactor/numpy/f2py/docs/usersguide/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