Did I find the right examples for you? yes no

All Samples(1090)  |  Call(1022)  |  Derive(0)  |  Import(68)
Return the indices of the minimum values along an axis.

See Also
--------
argmax : Similar function.  Please refer to `numpy.argmax` for detailed
    documentation.

        def argmin(a, axis=None):
    """
    Return the indices of the minimum values along an axis.

    See Also
    --------
    argmax : Similar function.  Please refer to `numpy.argmax` for detailed
        documentation.

    """
    try:
        argmin = a.argmin
    except AttributeError:
        return _wrapit(a, 'argmin', axis)
    return argmin(axis)
        


src/g/c/gco_python-HEAD/example.py   gco_python(Download)
    x[:, 8:, 2] = -1
    unaries = x + 1.5 * np.random.normal(size=x.shape)
    x = np.argmin(x, axis=2)
    unaries = (unaries * 10).astype(np.int32)
    x_thresh = np.argmin(unaries, axis=2)

src/g/c/gco_python-HEAD/example_middlebury.py   gco_python(Download)
    plt.imshow(img2)
    plt.subplot(233, xticks=(), yticks=())
    plt.imshow(np.argmin(unaries, axis=2), interpolation='nearest')
    plt.subplot(223, xticks=(), yticks=())
    plt.imshow(potts_cut.reshape(newshape), interpolation='nearest')

src/s/t/statsmodels-0.5.0/statsmodels/sandbox/examples/example_pca_regression.py   statsmodels(Download)
print results
print 'best result for k, by AIC, BIC, R2_adj, L1O'
print np.r_[(np.argmin(results[:,1:3],0), np.argmax(results[:,3],0),
             np.argmin(results[:,-1],0))]
 

src/s/c/scikits.statsmodels-0.3.1/scikits/statsmodels/sandbox/examples/example_pca_regression.py   scikits.statsmodels(Download)
print results
print 'best result for k, by AIC, BIC, R2_adj, L1O'
print np.r_[(np.argmin(results[:,1:3],0), np.argmax(results[:,3],0),
             np.argmin(results[:,-1],0))]
 

src/m/i/migen-HEAD/examples/sim/cordic_err.py   migen(Download)
	c1 = ax.contour(widths, stages, err[0], lev/10, cmap=plt.cm.Greys_r)
	c2 = ax.contour(widths, stages, err[1], lev, cmap=plt.cm.Reds_r)
	ax.plot(widths[:, 0], stages[0, np.argmin(err[0], 1)], "ko")
	ax.plot(widths[:, 0], stages[0, np.argmin(err[1], 1)], "ro")
	print(widths[:, 0], stages[0, np.argmin(err[0], 1)],
			stages[0, np.argmin(err[1], 1)])

src/s/t/statsmodels-HEAD/statsmodels/sandbox/examples/example_pca_regression.py   statsmodels(Download)
print(results)
print('best result for k, by AIC, BIC, R2_adj, L1O')
print(np.r_[(np.argmin(results[:,1:3],0), np.argmax(results[:,3],0),
             np.argmin(results[:,-1],0))])
 

src/p/y/pycasp-HEAD/examples/music_recommendation/msdtools.py   pycasp(Download)
    fidx[0] = f_first
    for i in range(1,fidx.size):
        fidx[i] = np.argmin(np.abs(f_scaled - bandedges[i])) + f_first
        if i > 0:
            d = fidx[i]-fidx[i-1]

src/d/i/dipy-0.7.1/doc/examples/snr_in_cc.py   dipy(Download)
idx = np.sum(gtab.bvecs, axis=-1) == 0
gtab.bvecs[idx] = np.inf
axis_X = np.argmin(np.sum((gtab.bvecs-np.array([1, 0, 0]))**2, axis=-1))
axis_Y = np.argmin(np.sum((gtab.bvecs-np.array([0, 1, 0]))**2, axis=-1))
axis_Z = np.argmin(np.sum((gtab.bvecs-np.array([0, 0, 1]))**2, axis=-1))

src/s/c/scikit-learn-0.14.1/examples/ensemble/plot_gradient_boosting_oob.py   scikit-learn(Download)
 
# min loss according to OOB
oob_best_iter = x[np.argmin(cumsum)]
 
# min loss according to test (normalize such that first loss is 0)
test_score -= test_score[0]
test_best_iter = x[np.argmin(test_score)]
# min loss according to cv (normalize such that first loss is 0)
cv_score -= cv_score[0]
cv_best_iter = x[np.argmin(cv_score)]
 
# color brew for the three curves

src/s/c/scikit-image-0.9.3/doc/examples/plot_matching.py   scikit-image(Download)
 
    # use corner with minimum SSD as correspondence
    min_idx = np.argmin(SSDs)
    return coords_warped_subpix[min_idx]
 

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next