Skip to content

Commit

Permalink
DOC: fixed patch extraction comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vene committed Jul 10, 2011
1 parent 61cb912 commit cb9dbd0
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions scikits/learn/feature_extraction/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def reconstruct_from_patches_2d(patches, image_size):
Returns
-------
image: array with shape
image: array with shape (*image_size)
"""
Expand Down Expand Up @@ -318,18 +318,26 @@ def __init__(self, patch_size, max_patches=None, random_state=None):
self.random_state = random_state

def fit(self, X, y=None):
"""
XXX : docstring is missing
"""Do nothing and return the estimator unchanged
This method is just there to implement the usual API and hence
work in pipelines.
"""
return self

def transform(self, X):
"""
XXX : docstring is missing
"""Boolean thresholding of array-like or scipy.sparse matrix
Parameters
----------
X : array of shape (n_samples, *image_shape)
Array of images from which to extract patches
Returns
-------
patches: array
shape is (n_patches, patch_height, patch_width, n_colors)
or (n_patches, patch_height, patch_width) if n_colors is 1
"""
self.random_state = check_random_state(self.random_state)
patches = np.empty((0,) + self.patch_size)
Expand Down

0 comments on commit cb9dbd0

Please sign in to comment.