|
Last change
on this file since 13080 was 12817, checked in by neise, 14 years ago |
|
added examples folder with some small scripts for mere testing
|
|
File size:
272 bytes
|
| Line | |
|---|
| 1 | #!/usr/bin/python
|
|---|
| 2 | #
|
|---|
| 3 | # test of numpy where
|
|---|
| 4 | import numpy as np
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 | NPIX = 20
|
|---|
| 9 | a = np.random.rand( NPIX )
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 | a_gt_thr1 = np.where( a > 0.5 )
|
|---|
| 14 | a_gt_thr2 = np.where( a > 0.9 )
|
|---|
| 15 |
|
|---|
| 16 | for index in a_gt_thr1[0] :
|
|---|
| 17 | print index
|
|---|
| 18 |
|
|---|
| 19 | print 'a_gt_thr1', a_gt_thr1
|
|---|
| 20 | print 'a_gt_thr2', a_gt_thr2
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.