[SciPy-dev] about data sets

Johann Cohen-Tanugi cohen@slac.stanford....
Thu May 22 00:31:06 CDT 2008



Robert Kern wrote:
> On Wed, May 21, 2008 at 7:18 PM, Jarrod Millman <millman@berkeley.edu> wrote:
>   
>> On Wed, May 21, 2008 at 3:13 PM, Johann Cohen-Tanugi
>> <cohen@slac.stanford.edu> wrote:
>>     
>>> I just had the opportunity to use loadtxt today and looked for the
>>> docstring with the marathon in mind. And of course it is a non working
>>> example as the data file that it is supposed to load does not exist....
>>> I noticed some time ago that David Cournapeau (I think) had started a
>>> discussion about this at http://scipy.org/scipy/scikits/wiki/DataSets
>>> .... I agree with him that loadable datasets in R are a big plus of this
>>> software.
>>> I guess that in principle I could create a buffer to read back with
>>> loadtxt in the example, but given the long term goals of this doc
>>> marathon, I thought that it might be useful to raise this issue right
>>> away....
>>>       
>> I am not entirely sure that the discussion that David started is
>> applicable in this case.  In the loadtxt example, it is showing how to
>> use a data io function, so it doesn't make sense to use the kind of
>> interface that was being proposed in David's discussion.  You may be
>> more interested in this:
>> http://projects.scipy.org/scipy/numpy/browser/trunk/numpy/lib/_datasource.py
>> That way the data can be hosted on a remote website.
>>     
>
> doctestable examples accessing the internet gives me heebie-jeebies.
>
>   
I fully agree
> Frankly, I'd prefer that one just use a StringIO and keep the data small.
>   
Ok, so that would be the standard way to do it for doctestable 
examples......
I will change the wiki loadtxt example accordingly, and make a note of 
the normal way one would use this function.

Johann


More information about the Scipy-dev mailing list