bugGNU Octave - Bugs: bug #49546, importdata() fails for textfiles...

 
 

bug #49546: importdata() fails for textfiles with missing values

Submitted by:  Lars Kindermann <larskindermann>
Submitted on:  Sun 06 Nov 2016 03:54:50 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Mon 07 Nov 2016 11:49:45 PM UTC, comment #6:

I fixed the failing BIST test here (http://hg.savannah.gnu.org/hgweb/octave/rev/6f111a0f32c3).

In addition, now that audioread is available I extended importdata to all importing sound files (http://hg.savannah.gnu.org/hgweb/octave/rev/44d9d526d1e3).

Rik <rik5>
Project Administrator
Mon 07 Nov 2016 09:57:29 PM UTC, comment #5:

With that fix I now get (octave-4.3.0+):

Philip Nienhuis <philipnienhuis>
Project Member
Mon 07 Nov 2016 04:07:24 PM UTC, comment #4:

Good. I made the change to use NaN here (http://hg.savannah.gnu.org/hgweb/octave/rev/2cc35915bdc0).

Fixed, closing report.

Rik <rik5>
Project Administrator
Mon 07 Nov 2016 06:43:29 AM UTC, comment #3:

With Matlab 2015a

So the correcr fix is to replace NA by NaN

Avinoam Kalma <avinoam>
Project Member
Mon 07 Nov 2016 12:51:01 AM UTC, comment #2:

Since importdata is a Matlab function, we should try and be compatible. Can somone run in Matlab and see what it uses for an empty value?

Rik <rik5>
Project Administrator
Sun 06 Nov 2016 09:39:32 PM UTC, comment #1:

This problem is caused probably by changeset http://hg.savannah.gnu.org/hgweb/octave/rev/a93887d7f0da which
fix a bug in dlmread to Use EmptyValue option correctly.

Now that EmptyValue is used correctly, the lines

cause NA to be written in the empty place, and that causes the error.

The NA can be replaced by 0, and then you get
1 2
1 0

or by NaN, and then you get
1 2
1 NaN

but you do not get an error.

Avinoam Kalma <avinoam>
Project Member
Sun 06 Nov 2016 03:54:50 PM UTC, original submission:

For a textfile data.txt containing the lines:

the command importdata("data.log"," ") crashes in current dev:

while until few days ago (and in 4.0) it used to worked like:

This breaks a lot of scripts.

Lars Kindermann <larskindermann>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by avinoam (Posted a comment)
  • -unavailable- added by larskindermann (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 07 Nov 2016 04:07:24 PM UTCrik5StatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
    Mon 07 Nov 2016 12:51:01 AM UTCrik5StatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1