You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Examples
--------
First we create a file for the example.
>>> s1 = '1.0,2.0,3.0\n4.0,5.0,6.0\n'
>>> with open('example1.csv', 'w') as f:
... f.write(s1)
>>> a1 = read_from_filename('example1.csv')
>>> a1
array([[1., 2., 3.],
[4., 5., 6.]])
The second example has columns with different data types, so a
one-dimensional array with a structured data type is returned.
The tab character is used as the field delimiter.
>>> s2 = '1.0\t10\talpha\n2.3\t25\tbeta\n4.5\t16\tgamma\n'
>>> with open('example2.tsv', 'w') as f:
... f.write(s2)
>>> a2 = read_from_filename('example2.tsv', delimiter='\t')
>>> a2
array([(1. , 10, b'alpha'), (2.3, 25, b'beta'), (4.5, 16, b'gamma')],
dtype=[('f0', '<f8'), ('f1', 'u1'), ('f2', 'S5')])
Both reference read_from_filename, which is nowhere to be found.
Maybe a rename at somepoint ?
Idea or request for content:
the function is called _read and seam to only be used in the same file in loadtxt and the imaginary_unit parameter seem to not be used in the sole call site.
If this is private, maybe move the example the the higher level function that use this one.
The text was updated successfully, but these errors were encountered:
ping @seberg who added the docstrings in 1e15b43. Just looking at the commit, maybe the _read function added in that commit was originally named read_from_filename?
@ngoldbaum yeah, I think that is correct. I would agree with removing the examples (and maybe making sure that loadtxt has it, but really all that it needs as docs might be to point to loadtxt and saying that its a helper for that)
Issue with current documentation:
Those two examples are present:
Both reference
read_from_filename
, which is nowhere to be found.Maybe a rename at somepoint ?
Idea or request for content:
the function is called
_read
and seam to only be used in the same file inloadtxt
and theimaginary_unit
parameter seem to not be used in the sole call site.If this is private, maybe move the example the the higher level function that use this one.
The text was updated successfully, but these errors were encountered: