##// END OF EJS Templates
Update some docstring to conform to numpy docstring format
Matthias Bussonnier -
Show More
@@ -851,18 +851,26 b' class Image(DisplayObject):'
851
851
852 Examples
852 Examples
853 --------
853 --------
854 # embedded image data, works in qtconsole and notebook
854
855 # when passed positionally, the first arg can be any of raw image data,
855 embedded image data, works in qtconsole and notebook
856 # a URL, or a filename from which to load image data.
856 when passed positionally, the first arg can be any of raw image data,
857 # The result is always embedding image data for inline images.
857 a URL, or a filename from which to load image data.
858 Image('http://www.google.fr/images/srpr/logo3w.png')
858 The result is always embedding image data for inline images.
859 Image('/path/to/image.jpg')
859
860 Image(b'RAW_PNG_DATA...')
860 >>> Image('http://www.google.fr/images/srpr/logo3w.png')
861
861 <IPython.core.display.Image object>
862 # Specifying Image(url=...) does not embed the image data,
862
863 # it only generates `<img>` tag with a link to the source.
863 >>> Image('/path/to/image.jpg')
864 # This will not work in the qtconsole or offline.
864 <IPython.core.display.Image object>
865 Image(url='http://www.google.fr/images/srpr/logo3w.png')
865
866 >>> Image(b'RAW_PNG_DATA...')
867 <IPython.core.display.Image object>
868
869 Specifying Image(url=...) does not embed the image data,
870 it only generates ``<img>`` tag with a link to the source.
871 This will not work in the qtconsole or offline.
872
873 >>> Image(url='http://www.google.fr/images/srpr/logo3w.png')
866
874
867 """
875 """
868 if isinstance(data, (Path, PurePath)):
876 if isinstance(data, (Path, PurePath)):
@@ -70,13 +70,13 b' class Audio(DisplayObject):'
70 ... framerate = 44100
70 ... framerate = 44100
71 ... t = np.linspace(0,5,framerate*5)
71 ... t = np.linspace(0,5,framerate*5)
72 ... data = np.sin(2*np.pi*220*t) + np.sin(2*np.pi*224*t)
72 ... data = np.sin(2*np.pi*220*t) + np.sin(2*np.pi*224*t)
73 ... Audio(data,rate=framerate)
73 ... Audio(data, rate=framerate)
74
74
75 Can also do stereo or more channels
75 Can also do stereo or more channels
76
76
77 >>> dataleft = np.sin(2*np.pi*220*t)
77 >>> dataleft = np.sin(2*np.pi*220*t)
78 ... dataright = np.sin(2*np.pi*224*t)
78 ... dataright = np.sin(2*np.pi*224*t)
79 ... Audio([dataleft, dataright],rate=framerate)
79 ... Audio([dataleft, dataright], rate=framerate)
80
80
81 From URL:
81 From URL:
82
82
General Comments 0
You need to be logged in to leave comments. Login now