Skip to content

Commit 7103a7a

Browse files
committed
Update write_from_function.rst
1 parent a7f0c1d commit 7103a7a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/write_from_function.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ We will walk through by way of example, using :meth:`~WrightTools.data.from_JASC
7272
else:
7373
data = parent.create_data(**kwargs)
7474
# array
75-
ds = np.DataSource(None)
75+
ds = np.lib.npyio.DataSource(None)
7676
f = ds.open(filestr, "rt")
7777
arr = np.genfromtxt(f, skip_header=18).T
7878
f.close()
@@ -249,7 +249,7 @@ For one-dimensional data formats, this is particularly easy:
249249
.. code-block:: python
250250
251251
# array
252-
ds = np.DataSource(None)
252+
ds = np.lib.npyio.DataSource(None)
253253
f = ds.open(filestr, "rt")
254254
arr = np.genfromtxt(f, skip_header=18).T
255255
f.close()
@@ -260,7 +260,7 @@ For one-dimensional data formats, this is particularly easy:
260260
:class:`numpy.DataSource` is a class which provides transparent decompression and remote file retrieval.
261261
:func:`numpy.genfromtxt` will handle this itself, however it will leave the downloaded files in the
262262
working directory, and opening explicitly allows you to use the file more directly as well.
263-
Using ``np.DataSource(None)`` causes it to use temporary files which are removed automatically.
263+
Using ``numpy.lib.npyio.DataSource(None)`` causes it to use temporary files which are removed automatically.
264264
Opening in ``"rt"`` mode ensures that you are reading as text.
265265

266266
Parsing multidimensional datasets (and in particular formats which allow arbitrary dimensionality)

0 commit comments

Comments
 (0)