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

 
 

bug #58294: importdata duplicates header lines

Submitter:  Fabio <efferre79>
Submitted:  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 Release: 
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group 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.15-e6e5.
    Corresponding source code