ó 2ÄÈ[c@`s¼dZddlmZmZmZddd!ZdZddlZdd l m Z dd l m Z dd l m Z mZdd lTiZd „ZdejƒjadadZd„ZdS(sJ Build F90 module support for f2py2e. Copyright 2000 Pearu Peterson all rights reserved, Pearu Peterson Permission to use, modify, and distribute this software is given under the terms of the NumPy License. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: 2005/02/03 19:30:23 $ Pearu Peterson i(tdivisiontabsolute_importtprint_functions$Revision: 1.27 $i iÿÿÿÿs See `f2py -v`Ni(t capi_maps(t func2subr(tundo_rmbadnametundo_rmbadname1(t*cC`snt|ƒr|gSt|ƒs#gSg}x>|dD]2}t|ƒrV|j|ƒq4|t|ƒ}q4W|S(Ntbody(tismodulethasbodytappendtfindf90modules(tmtrettb((s6/tmp/pip-build-fiC0ax/numpy/numpy/f2py/f90mod_rules.pyR $s   s external f2pysetdata logical ns integer r,i integer(%d) s(*) ns = .FALSE. if (allocated(d)) then do i=1,r if ((size(d,i).ne.s(i)).and.(s(i).ge.0)) then ns = .TRUE. end if end do if (ns) then deallocate(d) end if end if if ((.not.allocated(d)).and.(s(1).ge.1)) thens« end if if (allocated(d)) then do i=1,r s(i) = size(d,i) end do end if flag = 1 call f2pysetdata(d,allocated(d))sÕ end if if (allocated(d)) then do i=1,r s(i) = size(d,i) end do !s(r) must be equal to len(d(1)) end if flag = 2 call f2pysetdata(d,allocated(d))c% C`sK ddlm}igd6gd6gd6ddgd6id d 6d d 6d 6d gd6gd6}dg}|d„}dg}|d„}xc t|ƒD]U }gggg|dggf\}} } } } } g}g}g}t|ƒrx&|dD]}| j|dƒqõWnxe|djƒD]S}|d|}|| kr$tttƒ|ƒ r$| j|ƒ|j|ƒq$q$Wt d|dƒ| r­t ddj | ƒƒndg}|d„}dg}|d„}t j |ƒ}|d|dƒ|d|dƒt |ƒrN|d}t|tƒrAd j |ƒ}n||ƒn| ra|dƒnx| D] }|d|}| j|ƒt j|ƒ}t j|}t j||ƒ}|djdd ƒjƒ}|jd!d ƒjƒ}|súd }nt}t|ƒr‡d"|kr`d#|d"kr`|d$t|ƒ|d%||d"d#|fƒt}q«|d&t|ƒ|d%||fƒn$|d&t|ƒ|d%||fƒ|d't j||ƒƒt |ƒr |d}t|tƒrüd j |ƒ}n|d(|ƒnt|ƒr0| jd)|d|fƒ| j| d*ƒ|jd+|ƒ|jd,ƒ|d-|d|fƒ|d.| d*ƒ|d/|dt|ƒfƒ|d0ƒ|d1t|d1<|j|ƒ\} }!t |ƒre|d1|!|d1<| jd?|d|dfƒ|jt!j"|d@dƒƒnx|!r»|d1|!|d1<| jd?|d|dfƒ|jt!j#|d@dƒƒn"| j|dƒ|j| d*ƒg| dA %s s integer flag is range(1,%s+1)s allocate(d(%s)) t,ss(%s)send subroutine %sschar *%sschar*s! f2py_%s_def[i_f2py++].data = %s;s\end{description}tSkippingtblocks%s()t modulenamesf2pywrap_%s_%st signaturetexternroutinestdocshorts_ {"%s",-1,{{-1}},0,NULL,(void *)f2py_rout_#modulename#_%s_%s,doc_f2py_rout_#modulename#_%s_%s},schar *s {NULL} }; t}s0static void f2py_setup_%s(%s) { int i_f2py=0;%st_t F_FUNC_USs4extern void %s(f2pyinit%s,F2PYINIT%s)(void (*)(%s));s static void f2py_init_%s(void) {s* %s(f2pyinit%s,F2PYINIT%s)(f2py_setup_%s);s} sN PyDict_SetItemString(d, "%s", PyFortranObject_New(f2py_%s_def,f2py_init_%s));s$subroutine f2pyinit%s(f2pysetupfunc)suse %s, only : %st interfaces end interfacesexternal f2pysetupfuncs external %sscall f2pysetupfunc(%s)send subroutine f2pyinit%s s \subsection{s\subsubsection{s " %s --- %s"t routine_defstdoc()RRR R R tkeystl_ort isintent_hidet isprivatetoutmesstjoinRt modsign2mapthasnotet isinstancetlisttgetctypet c2capi_mapt getarrdimstreplacetstript fgetdims2t isstringarrayRt fgetdims2_sat getarrdocsignt isallocatablet fgetdims1tevalt isroutinetprinttbuildapit isfunctionRtcreatefuncwrappertcreatesubrwrappert applyrulest dictappendtupperRR((%tpymodRRtfhooksRR6RR tsargstfargstefargstmodobjstnotvarstonlyvarstsargsptifargstmfargsRtntvartchooksR"tihooksR#tvrdR$tcttattdmtdmst use_fgetdims2titapitwraptarRta((s6/tmp/pip-build-fiC0ax/numpy/numpy/f2py/f90mod_rules.pyt buildhooksYsH        % "               ) !      (         +   % +& +         (t__doc__t __future__RRRt __version__t f2py_versiontnumpytnpRRRt crackfortranRRtauxfuncstoptionsR tintptitemsizeRKRFRHRp(((s6/tmp/pip-build-fiC0ax/numpy/numpy/f2py/f90mod_rules.pyts