>. Ndimage, astype(a.dtype) array(

>. Ndimage, astype(a.dtype) array([[ 0

@. Opening, >. , and =. Np, zeros((5, 5), dtype=np.int) >>> a[1:4, 1:4] = 1 >>> a[4, 4] = 1 >>> a array, 2000.

>. and =. Ndimage, generate_binary_structure(2, 1) >>> el array([[False

>. Ndimage, astype(a.dtype) array(

>. Ndimage, astype(a.dtype) array([[ 0

>. and =. Ndimage, distance_transform_bf(square) >>> dilate_dist = ndimage.grey_dilation(dist, size=(3, 3), \ ... structure=np.ones, issue.3

>. and =. Ndimage, binary_erosion(square) >>> reconstruction = ndimage.binary_propagation(eroded_square, mask=square)

>. Sy and =. Ndimage, sobel(im, axis=1, mode=constant) >>> sob = np.hypot(sx, sy) References Mathematical optimization is very ... mathematical. If you want performance, it really pays to read the books: ? Convex Optimization by

>. and =. Cluster, KMeans(n_clusters=3) >>> k_means.fit(iris.data)

>. and =. Grid_search, GridSearchCV(estimator=svc, param_grid=dict(gamma=gammas)