|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /proc/self/root/usr/lib/python2.4/site-packages/Numeric/ |
Upload File : |
mò
C1?c @ s d k Z d k Z d k Z d k Z d k Z d k Td e f d „ ƒ YZ d d d „ Z e ƒ d „ Z g d „ Z
g d „ Z g d „ Z d g d
„ Z d g d „ Z d
„ Z g d „ Z g d „ Z g d „ Z g d „ Z g d „ Z g d „ Z g d „ Z g d „ Z g d „ Z g d „ Z g d „ Z g d „ Z g d „ Z g d „ Z g d „ Z d „ Z e! d j o e ƒ n d S( N( t *t
ArgumentErrorc B s t Z RS( N( t __name__t
__module__( ( ( t7 /usr/lib/python2.4/site-packages/Numeric/RandomArray.pyR
s i c C s´ t | ƒ t j p t | ƒ t j o
t d ‚ n | d j o` d k } | i ƒ } t t i | ƒ ƒ } d | d } t | | ƒ } d t | | ƒ } n t i
| | ƒ d S( sb seed(x, y), set the seed using the integers x, y;
Set a random one from clock if y == 0
s seed requires integer arguments.i Ni
i i ( t typet xt IntTypet yR t timet tt intt matht log10t ndigitst baset ranlibt set_seeds( R R R R R
R ( ( R t seed s &
c C s
t i ƒ S( s Return the current seed pairN( R t get_seeds( ( ( R t get_seed! s c C s‘ t | t ƒ o
| g } n t | ƒ d j o9 t i i | ƒ } t | | | f ƒ } | | _ | Sn% d } t | | | f ƒ } | d Sd S( Ni i ( t
isinstancet shapeR t lent Numerict multiplyt reducet nt applyt funt argst s( R R R R R ( ( R t _build_random_array% s
c C s t t i f | ƒ S( s@ random(n) or random([n, m, ...]) returns array of random numbersN( R R t sampleR ( R ( ( R t random6 s c C s | | | t | ƒ S( sd uniform(minimum, maximum, shape=[]) returns array of given shape of random reals
in given rangeN( t minimumt maximumR"