bugGNU Octave - Bugs: bug #58294, importdata duplicates header lines

 
 

bug #58294: importdata duplicates header lines

Submitted by:  Fabio <efferre79>
Submitted on:  Sat 02 May 2020 05:53:49 PM UTC  
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 24 May 2020 01:58:57 AM UTC, comment #1: 

I used your patch as a basis and extended it in this changeset: https://hg.savannah.gnu.org/hgweb/octave/rev/8aef9f5755fe.  The problem behavior has been fixed, and the correct number of header lines is now returned if the user has overridden automatic detection.  I also added a BIST test specifically for the behavior in this bug report so any future changes don't accidentally re-introduce the problem.  I also added a BIST test for the new warning which can be thrown when the user's specified number of header lines disagrees with the number of auto-detected lines.

Marking as fixed and closing report.

Rik <rik5>
Project Administrator
Sat 02 May 2020 05:53:49 PM UTC, original submission:  

in the current version of importdata.m the header lines can appear duplicated in the output.textdata section if the wrong number of header lines is suggested by the user

I have created a patch that solves the issue, moreover I have also added a warning to the user when the auto-detected number of headelines is greater than the value asked by the user (in that way the user doesn't get many NA lines at the beginning of output.data)

I have added here a test datafile to show the problem:

importdata('test.log',"\t") % no problem here
importdata('test.log',"\t",1) % problem is here evident

Fabio <efferre79>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #48989:  test.log added by efferre79 (85B - text/x-log)
file #48990:  importdata.m.patch added by efferre79 (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by efferre79 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-05-24 rik5 StatusNone => Fixed
        Open/ClosedOpen => Closed
        Release5.2.0 => dev
    2020-05-02 efferre79 Attached File- => Added test.log, #48989
        Attached File- => Added importdata.m.patch, #48990

    Back to the top


    Powered by Savane 3.5