[SciPy-dev] misc, hand, and friends

pearu at scipy.org pearu at scipy.org
Wed Mar 27 15:22:28 EST 2002


Hi,

On Wed, 27 Mar 2002, eric wrote:

> > (Later, be not surprised if I will question the naming of handy.py and
> > misc.py, but I am not ready for that yet ...;-)
> 
> Funny you should mention that.  misc.py was my utility module.  handy.py was
> Travis O.'s.  We both thought they should be merged into an appropriately named
> module in the move to scipy_base.  Pick a name.

I think we should pick many names here... 

Some months back I made a quick reference card on scipy functions and
their dependencies for my self. It follows below. Note that it aims not
to be complete or updated but to give some prespective.

A quick look on this map shows to me a rather high scattering of
relative functions in different modules. In the following messages I shall
be more specific to give some starting ideas on re-factoring this
stuff. Please, feel free to draw your own conclusions so that overlapping
ideas can be collected and applied.

Pearu


-----------------------------------
scipy:
    __init__:
        import Numeric,os,sys,fastumath,string
        from helpmod import help, source
        from Matrix import Matrix as Mat
        defines:
            Inf,inf,NaN,nan
            somenames2all,names2all,modules2all,objects2all
    helpmod:
        import inspect,types,sys,os
        defines:
            split_line,makenamedict,help,source
    handy:
        import Numeric,types,cPickle,sys,scipy,re
        from Numeric import *
        from fastumath import *
        defines:
            ScalarType
            nd_grid,grid
            concatenator,r_,c_
            index_exp
            disp,logspace,linspace
            fix,mod,fftshift,ifftshift,fftfreq,cont_ft,r1array
            r2array,who,objsave,objload,isscalar,toeplitz,
            hankel,real_if_close,sort_complex,poly,polyint,
            polyder,polyval,polyadd,polysub,polymul,polydiv,
            deconvolve,poly1d,select

    misc:
        import scipy.special
        from types import IntType,ComplexType
        defines:
            real,imag,iscomplex,isreal,array_iscomplex,array_isreal
            isposinf,isneginf,nan_to_num,logn,log2,lena,
            histogram,trim_zeros,atleast_1d,atleast_2d,atleast_3d,
            vstack,hstack,column_stack,dstack,replace_zero_by_x_arrays,
            array_split,split,hsplit,vsplit,dsplit
            x_array_kind,x_array_precision,x_array_type
            x_common_type
    limits:
        import Numeric
        defines:
            toChar,toInt8,toInt16,toInt32,toFloat32,toFloat64
            epsilon,tiny
            float_epsilon,float_tiny,float_min,float_max,
            float_precision,float_resolution
            double_epsilon,double_tiny
            double_min,double_max,double_precision,double_resolution
    data_store:
        import dumb_shelve
        import string,os
        defines:
            load,save,create_module,create_shelf
    dumb_shelve:
        from shelve import Shelf
        import zlib
        from cStringIO import StringIO
        import  cPickle
        defines:
            DbfilenameShelf,open
    dumbdbm_patched:
        defines:
            open
    basic:
        from Numeric import *
        import Matrix,copy
        from handy import isscalar, mod
        from fastumath import *
        defines:
            eye,tri,diag,fliplr,flipud,rot90,tril,triu,amax,amin
            ptp,mean,median,std,cumsum,prod,cumprod,diff
            cov,corrcoef,squeeze,sinc,angle,unwrap,allMat
    basic1a:
        import Numeric,fastumath,types,handy
        from scipy import diag,special,r1array,hstack
        from scipy.linalg import eig
        import scipy.stats as stats
        from Numeric import *
        from fastumath import *
        defines:
            find_non_zero,roots,factorial,comb,rand,randn

...
-------------------------------------------




More information about the SciPy-Dev mailing list