~ubuntu-branches/ubuntu/karmic/python-scipy/karmic

« back to all changes in this revision

Viewing changes to Lib/fftpack/fftpack.pyf

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T. Chen (new)
  • Date: 2005-03-16 02:15:29 UTC
  • Revision ID: james.westby@ubuntu.com-20050316021529-xrjlowsejs0cijig
Tags: upstream-0.3.2
ImportĀ upstreamĀ versionĀ 0.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
!%f90 -*- f90 -*-
 
2
! Author: Pearu Peterson, August 2002
 
3
 
 
4
python module _fftpack
 
5
    interface
 
6
 
 
7
       subroutine zfft(x,n,direction,howmany,normalize)
 
8
         ! y = fft(x[,n,direction,normalize,overwrite_x])
 
9
         intent(c) zfft
 
10
         complex*16 intent(c,in,out,copy,out=y) :: x(*)
 
11
         integer optional,depend(x),intent(c,in) :: n=size(x)
 
12
         check(n>0) n
 
13
         integer depend(x,n),intent(c,hide) :: howmany = size(x)/n
 
14
         check(n*howmany==size(x)) howmany
 
15
         integer optional,intent(c,in) :: direction = 1
 
16
         integer optional,intent(c,in),depend(direction) &
 
17
              :: normalize = (direction<0)
 
18
       end subroutine zfft
 
19
 
 
20
       subroutine drfft(x,n,direction,howmany,normalize)
 
21
         ! y = drfft(x[,n,direction,normalize,overwrite_x])
 
22
         intent(c) drfft
 
23
         real*8 intent(c,in,out,copy,out=y) :: x(*)
 
24
         integer optional,depend(x),intent(c,in) :: n=size(x)
 
25
         check(n>0&&n<=size(x)) n
 
26
         integer depend(x,n),intent(c,hide) :: howmany = size(x)/n
 
27
         check(n*howmany==size(x)) howmany
 
28
         integer optional,intent(c,in) :: direction = 1
 
29
         integer optional,intent(c,in),depend(direction) &
 
30
              :: normalize = (direction<0)
 
31
       end subroutine drfft
 
32
 
 
33
       subroutine zrfft(x,n,direction,howmany,normalize)
 
34
         ! y = zrfft(x[,n,direction,normalize,overwrite_x])
 
35
         intent(c) zrfft
 
36
         complex*16 intent(c,in,out,overwrite,out=y) :: x(*)
 
37
         integer optional,depend(x),intent(c,in) :: n=size(x)
 
38
         check(n>0&&n<=size(x)) n
 
39
         integer depend(x,n),intent(c,hide) :: howmany = size(x)/n
 
40
         check(n*howmany==size(x)) howmany
 
41
         integer optional,intent(c,in) :: direction = 1
 
42
         integer optional,intent(c,in),depend(direction) &
 
43
              :: normalize = (direction<0)
 
44
       end subroutine zrfft
 
45
 
 
46
       subroutine zfftnd(x,r,s,direction,howmany,normalize,j)
 
47
         ! y = zfftnd(x[,s,direction,normalize,overwrite_x])
 
48
         intent(c) zfftnd
 
49
         complex*16 intent(c,in,out,copy,out=y) :: x(*)
 
50
         integer intent(c,hide),depend(x) :: r=old_rank(x)
 
51
         integer intent(c,hide) :: j=0
 
52
         integer optional,depend(r),dimension(r),intent(c,in) &
 
53
              :: s=old_shape(x,j++)
 
54
         check(r>=len(s)) s
 
55
         integer intent(c,hide) :: howmany = 1
 
56
         integer optional,intent(c,in) :: direction = 1
 
57
         integer optional,intent(c,in),depend(direction) :: &
 
58
              normalize = (direction<0)
 
59
         callprotoargument complex_double*,int,int*,int,int,int
 
60
         callstatement {&
 
61
              int i,sz=1,xsz=size(x); &
 
62
              for (i=0;i<r;++i) sz *= s[i]; &
 
63
              howmany = xsz/sz; &
 
64
              if (sz*howmany==xsz) &
 
65
                (*f2py_func)(x,r,s,direction,howmany,normalize); &
 
66
              else {&
 
67
                f2py_success = 0; &
 
68
                PyErr_SetString(_fftpack_error, &
 
69
                  "inconsistency in x.shape and s argument"); &
 
70
                } &
 
71
              }
 
72
       end subroutine zfftnd
 
73
 
 
74
       subroutine destroy_zfft_cache()
 
75
         intent(c) destroy_zfft_cache
 
76
       end subroutine destroy_zfft_cache
 
77
 
 
78
       subroutine destroy_zfftnd_cache()
 
79
         intent(c) destroy_zfftnd_cache
 
80
       end subroutine destroy_zfftnd_cache
 
81
 
 
82
       subroutine destroy_drfft_cache()
 
83
         intent(c) destroy_drfft_cache
 
84
       end subroutine destroy_drfft_cache
 
85
 
 
86
    end interface 
 
87
end python module _fftpack
 
88
 
 
89
! See http://cens.ioc.ee/projects/f2py2e/