Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120139366
test.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Jul 2, 05:17
Size
531 B
Mime Type
text/x-python
Expires
Fri, Jul 4, 05:17 (2 d)
Engine
blob
Format
Raw Data
Handle
27146197
Attached To
rPNBODY pNbody
test.py
View Options
#from Nbody import *
from
myNumeric
import
*
from
numarray
import
*
from
numarray
import
random_array
as
rand
import
sys
vec
=
rand
.
random
((
int
(
1e6
),
3
))
lst
=
[(
0
,
1
,
30
),(
0
,
1
,
30
),(
0
,
1
,
30
)]
lst
=
[(
0
,
1
,
10
),(
0
,
1
,
10
),(
0
,
1
,
10
)]
#vec = rand.random((10))
#lst = [(0,1,10)]
h
=
hnd
(
lst
,
vec
)
print
h
.
shape
print
h
print
sum
(
ravel
(
h
))
sys
.
exit
()
r
=
arange
(
11
)
.
astype
(
Float
)
x
=
array
([
-
1
,
1.1
,
100
,
9.9
,
9
],
Float
)
m
=
array
([
1
,
1
,
0.1
,
1
,
1
],
Float
)
#print x
#print r
print
whistogram
(
x
,
m
,
r
)
print
histogram
(
x
,
r
)
.
astype
(
Float
)
Event Timeline
Log In to Comment