Mercurial > repos > mvdbeek > dapars
comparison dapars.py @ 21:eace1635959a draft
planemo upload for repository https://github.com/mvdbeek/dapars commit b1b007c561ea6c9db145c88b6b128d66ecd05e24-dirty
author | mvdbeek |
---|---|
date | Fri, 30 Oct 2015 12:08:20 -0400 |
parents | 71db297a0edd |
children | 4309798bfb61 |
comparison
equal
deleted
inserted
replaced
20:71db297a0edd | 21:eace1635959a |
---|---|
363 def get_minima(a, local_minimum=False): | 363 def get_minima(a, local_minimum=False): |
364 """ | 364 """ |
365 get minima for numpy array a. If local is false, only return absolute minimum | 365 get minima for numpy array a. If local is false, only return absolute minimum |
366 """ | 366 """ |
367 if not local_minimum: | 367 if not local_minimum: |
368 return np.where(a == a.min()) | 368 print np.where(a == a.min())[0] |
369 return np.where(a == a.min())[0] | |
369 else: | 370 else: |
370 return np.where(np.r_[True, a[1:] < a[:-1]] & np.r_[a[:-1] < a[1:], True])[0]+1 | 371 return np.where(np.r_[True, a[1:] < a[:-1]] & np.r_[a[:-1] < a[1:], True])[0]+1 |
371 | 372 |
372 def estimate_mse(cov, bp, num_samples, num_control): | 373 def estimate_mse(cov, bp, num_samples, num_control): |
373 """ | 374 """ |