Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F71012865
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
Mon, Jul 8, 18:53
Size
531 B
Mime Type
text/x-python
Expires
Wed, Jul 10, 18:53 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
18896270
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