astype(a.dtype) array( ,
astype(a.dtype) array([[ 0 ,
zeros((5, 5), dtype=np.int) >>> a[1:4, 1:4] = 1 >>> a[4, 4] = 1 >>> a array, 2000. ,
generate_binary_structure(2, 1) >>> el array([[False ,
astype(a.dtype) array( ,
astype(a.dtype) array([[ 0 ,
distance_transform_bf(square) >>> dilate_dist = ndimage.grey_dilation(dist, size=(3, 3), \ ... structure=np.ones, issue.3 ,
binary_erosion(square) >>> reconstruction = ndimage.binary_propagation(eroded_square, mask=square) ,
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 ,
KMeans(n_clusters=3) >>> k_means.fit(iris.data) ,
GridSearchCV(estimator=svc, param_grid=dict(gamma=gammas) ,