Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

P3K : Changed / to // to typecast float to int

  • Loading branch information...
commit 704b8619f9ebbb95dbbc6160a0cced2225e8e187 1 parent 9fea659
@smoitra87 smoitra87 authored GaelVaroquaux committed
Showing with 4 additions and 4 deletions.
  1. +4 −4 sklearn/feature_extraction/image.py
View
8 sklearn/feature_extraction/image.py
@@ -46,11 +46,11 @@ def _make_edges_3d(n_x, n_y, n_z=1):
def _compute_gradient_3d(edges, img):
n_x, n_y, n_z = img.shape
- gradient = np.abs(img[edges[0] / (n_y * n_z),
- (edges[0] % (n_y * n_z)) / n_z,
+ gradient = np.abs(img[edges[0] // (n_y * n_z),
+ (edges[0] % (n_y * n_z)) // n_z,
(edges[0] % (n_y * n_z)) % n_z] -
- img[edges[1] / (n_y * n_z),
- (edges[1] % (n_y * n_z)) / n_z,
+ img[edges[1] // (n_y * n_z),
+ (edges[1] % (n_y * n_z)) // n_z,
(edges[1] % (n_y * n_z)) % n_z])
return gradient
Please sign in to comment.
Something went wrong with that request. Please try again.