|
From: | Przemek Klosowski |
Subject: | Re: File found by searching load path |
Date: | Fri, 7 Dec 2018 15:15:19 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 |
On 12/7/18 2:28 PM, Rik wrote:
There is a new bug report #55173 which which shows, possibly, an irrelevant warning. octave:1> load penny.mat warning: load: '/usr/local/share/octave/5.0.0/data/penny.mat' found by searching load path I can see two approaches. First, this warning has an ID, Octave:data-file-in-path, and we could change the default on Octave startup to disable this warning. At that point, a user would have to actively turn on this warning to see it. Alternatively, I'm not sure why it is useful to know that the data file was found in the load path. We could just remove the code entirely. Any votes one way or the other?
On the face of it, the warning is silly ("2+2 : warning: addition: result 4 found by applying the rules of arithmetic"). I think the intent might have been to show the actual location of the file: I could see how it might be useful to capture that, if 'load' allowed 2 return parameters :
[x,f]=load('penny.mat') where x is the dataset being read and f is the filename. All output should be catchable : it's neat that you can do s=pkg('list') for i=1:length(s) printf("%s: %s\n",s{i}.name,s{i}.description) endI thought there were instances where this was not the case (I seem to remember that pkg didn't always provide a way to capture the output), but I can't recall where I ran into it.
BTW, is there a way to cut through a cell array without a loop, like s{1:length(s)}.name?
[Prev in Thread] | Current Thread | [Next in Thread] |