[SciPy-dev] misc, hand, and friends

pearu at scipy.org pearu at scipy.org
Wed Mar 27 16:21:23 EST 2002


Hi again,

Below I just outline some ideas on cleaning scipy up and without taking
into account actual implementation details of these functions.          

The analysis is very raw and the suggestions may only show possible
directions. Currently I find quite difficult to decide where a particular
function should go because the overall structure really needs refactored
and an overall purpose of each part should be summarized.

Can someone layout a more detailed vision of scipy parts and structure? 
I am a bit lost right now, may be due to the late hour here ...

Pearu

On Wed, 27 Mar 2002 pearu at scipy.org wrote:

> -----------------------------------
> scipy:
>     __init__:
>         defines:
>             Inf,inf,NaN,nan
>             somenames2all,names2all,modules2all,objects2all

Eric mentioned the problem with NaN stuff. I have not looked into it yet..

>     helpmod:
>         defines:
>             split_line,makenamedict,help,source

There is also helper.py that defines help2,help3,etc.
Merge helper.py and helpmod.py.

>     handy:
>         defines:
>             ScalarType

>             nd_grid,grid
>             concatenator,r_,c_
>             index_exp

these functions could be factored somewhere.

>             disp

find a better place..

> logspace,linspace

dito

>             fix,mod,fftshift,ifftshift,fftfreq,cont_ft,

fft stuff could go into a yet not existing transform module.
I have in mind implementing other transforms as well like hilbert, etc.
that is based on fft.

> r1array
>             r2array

find or make a place ..

> who

find or make a place ..

> objsave,objload

related to data_store??

> isscalar,

> toeplitz,
>             hankel

should go into Matrix

> real_if_close,sort_complex,

find or make a place

> poly,polyint,
>             polyder,polyval,polyadd,polysub,polymul,polydiv,
>             deconvolve,poly1d,select

collect poly,polyint,... into a separate polynomial module?

>     misc:
>         defines:
>             real,imag

Put into scimath.py?

> iscomplex,isreal,array_iscomplex,array_isreal
>             isposinf,isneginf

find or make a place

> nan_to_num,logn,log2

put into scimath.py?
 
> lena

?? to something with it

>             histogram,trim_zeros,atleast_1d,atleast_2d,atleast_3d,
>             vstack,hstack,column_stack,dstack,replace_zero_by_x_arrays,

Looks like a stuff for a separate module. Any relation to basic.py?

>             array_split,split,hsplit,vsplit,dsplit

find or make a place

>             x_array_kind,x_array_precision,x_array_type
>             x_common_type

find a place

>     limits:
>         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

That looks ok to me.

>     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

Merge data_store, dumb_shelve, dumbdbm_patched to reduce number of
files. Or make a separete package if this stuff will be extended.

>     basic:
>         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

looks like MLab

>     basic1a:
>         defines:
>             find_non_zero,roots,factorial,comb,rand,randn





More information about the SciPy-Dev mailing list