Skip to content

Commit 58c04f9

Browse files
committed
Pushing the docs to dev/ for branch: master, commit f4b230cc65f2a9091545779cb8595848765904fc
1 parent 9274ab8 commit 58c04f9

File tree

936 files changed

+2877
-2877
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

936 files changed

+2877
-2877
lines changed
1 Byte
Binary file not shown.
1 Byte
Binary file not shown.

dev/_downloads/plot_image_denoising.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
},
3838
"outputs": [],
3939
"source": [
40-
"try: # SciPy >= 0.16 have face in misc\n from scipy.misc import face\n face = face(gray=True)\nexcept ImportError:\n face = sp.face(gray=True)\n\n# Convert from uint8 representation with values between 0 and 255 to\n# a floating point representation with values between 0 and 1.\nface = face / 255\n\n# downsample for higher speed\nface = face[::2, ::2] + face[1::2, ::2] + face[::2, 1::2] + face[1::2, 1::2]\nface /= 4.0\nheight, width = face.shape\n\n# Distort the right half of the image\nprint('Distorting image...')\ndistorted = face.copy()\ndistorted[:, width // 2:] += 0.075 * np.random.randn(height, width // 2)\n\n# Extract all reference patches from the left half of the image\nprint('Extracting reference patches...')\nt0 = time()\npatch_size = (7, 7)\ndata = extract_patches_2d(distorted[:, :width // 2], patch_size)\ndata = data.reshape(data.shape[0], -1)\ndata -= np.mean(data, axis=0)\ndata /= np.std(data, axis=0)\nprint('done in %.2fs.' % (time() - t0))"
40+
"try: # SciPy >= 0.16 have face in misc\n from scipy.misc import face\n face = face(gray=True)\nexcept ImportError:\n face = sp.face(gray=True)\n\n# Convert from uint8 representation with values between 0 and 255 to\n# a floating point representation with values between 0 and 1.\nface = face / 255.\n\n# downsample for higher speed\nface = face[::2, ::2] + face[1::2, ::2] + face[::2, 1::2] + face[1::2, 1::2]\nface /= 4.0\nheight, width = face.shape\n\n# Distort the right half of the image\nprint('Distorting image...')\ndistorted = face.copy()\ndistorted[:, width // 2:] += 0.075 * np.random.randn(height, width // 2)\n\n# Extract all reference patches from the left half of the image\nprint('Extracting reference patches...')\nt0 = time()\npatch_size = (7, 7)\ndata = extract_patches_2d(distorted[:, :width // 2], patch_size)\ndata = data.reshape(data.shape[0], -1)\ndata -= np.mean(data, axis=0)\ndata /= np.std(data, axis=0)\nprint('done in %.2fs.' % (time() - t0))"
4141
]
4242
},
4343
{

dev/_downloads/plot_image_denoising.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
# Convert from uint8 representation with values between 0 and 255 to
5555
# a floating point representation with values between 0 and 1.
56-
face = face / 255
56+
face = face / 255.
5757

5858
# downsample for higher speed
5959
face = face[::2, ::2] + face[1::2, ::2] + face[::2, 1::2] + face[1::2, 1::2]

dev/_downloads/scikit-learn-docs.pdf

3.29 KB
Binary file not shown.
-84 Bytes
-84 Bytes
63 Bytes
63 Bytes
99 Bytes

0 commit comments

Comments
 (0)