[SciPy-User] [SciPy-user] Avoiding inner for loops??
Wed Aug 22 04:04:09 CDT 2012
On Wed, Aug 22, 2012 at 3:52 AM, mdekauwe <firstname.lastname@example.org> wrote:
> Actually one more thing I can't figure out, is I want to use the smallest
> difference, ie. from ss2 to get the relevant paramater values.
> ss2= ((obs[:, n_, n_, n_]- ans).sum(0)** 2).reshape(grid_size** 3)
> index = np.argmin(ss2, 0)
> but this index will be from the full grid (shape=8000) and not give me
> something I can pull the values from the param1, param2, param3 arrays
In : ss= ((obs[:, n_, n_, n_]- ans).sum(0)** 2)
In : ndx= where(ss.min()== ss)
In : ndx
Out: (array(), array(), array())
In : ss[ndx]
Out: array([ 2500.])
> thanks again.
> View this message in context:
> Sent from the Scipy-User mailing list archive at Nabble.com.
> SciPy-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User