17
17
DataSource files can also be compressed or uncompressed. Currently only
18
18
gzip, bz2 and xz are supported.
19
19
20
- Example::
20
+ Example
21
+
22
+ .. doctest-skip::
21
23
22
24
>>> # Create a DataSource, use os.curdir (default) for local storage.
23
25
>>> from numpy import DataSource
@@ -216,7 +218,9 @@ class DataSource:
216
218
Notes
217
219
-----
218
220
URLs require a scheme string (``http://``) to be used, without it they
219
- will fail::
221
+ will fail:
222
+
223
+ .. doctest-skip::
220
224
221
225
>>> repos = np.lib.npyio.DataSource()
222
226
>>> repos.exists('www.google.com/index.html')
@@ -228,7 +232,7 @@ class DataSource:
228
232
229
233
Examples
230
234
--------
231
- ::
235
+ .. doctest-skip ::
232
236
233
237
>>> ds = np.lib.npyio.DataSource('/home/guido')
234
238
>>> urlname = 'http://www.google.com/'
@@ -560,15 +564,19 @@ class Repository (DataSource):
560
564
Examples
561
565
--------
562
566
To analyze all files in the repository, do something like this
563
- (note: this is not self-contained code)::
567
+ (note: this is not self-contained code):
568
+
569
+ .. doctest-skip::
564
570
565
571
>>> repos = np.lib._datasource.Repository('/home/user/data/dir/')
566
572
>>> for filename in filelist:
567
573
... fp = repos.open(filename)
568
574
... fp.analyze()
569
575
... fp.close()
570
576
571
- Similarly you could use a URL for a repository::
577
+ Similarly you could use a URL for a repository:
578
+
579
+ .. doctest-skip::
572
580
573
581
>>> repos = np.lib._datasource.Repository('http://www.xyz.edu/data')
574
582
0 commit comments