Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit db3d206

Browse filesBrowse files
committed
Add a top dosctring and perform small cleaning/fixing ops to mri_with_eeg.py
1 parent dfc9cca commit db3d206
Copy full SHA for db3d206

File tree

Expand file treeCollapse file tree

1 file changed

+6
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-3
lines changed
Open diff view settings
Collapse file

‎examples/pylab_examples/mri_demo.py‎

Copy file name to clipboardExpand all lines: examples/pylab_examples/mri_demo.py
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
from __future__ import print_function
1+
"""Displays an MRI image."""
2+
23
import matplotlib.pyplot as plt
34
import matplotlib.cbook as cbook
45
import numpy as np
5-
# data are 256x256 16 bit integers
6+
7+
# Data are 256x256 16 bit integers
68
dfile = cbook.get_sample_data('s1045.ima.gz')
79
im = np.fromstring(dfile.read(), np.uint16).astype(float)
8-
im.shape = 256, 256
10+
im.shape = (256, 256)
11+
dfile.close()
912

1013
plt.imshow(im, cmap=plt.cm.gray)
1114
plt.axis('off')

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.