bugGNU Octave - Bugs: bug #42023, dlmread doesn't honor 'emptyvalue'...

 
 

bug #42023: dlmread doesn't honor 'emptyvalue' value for empty delimiter

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Tue 01 Apr 2014 08:44:32 PM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Philip NienhuisOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 23 Oct 2016 09:34:05 PM UTC, comment #1:

I checked in a major overhaul of dlmread to fix issues in bug #42025. The first part of the bug was fixed in that process. See http://hg.savannah.gnu.org/hgweb/octave/rev/471cc4268677.

The second half of the bug, imp2b.txt, was fixed in this cset http://hg.savannah.gnu.org/hgweb/octave/rev/a93887d7f0da.

Fixed, closing report.

Rik <rik5>
Project Administrator
Tue 01 Apr 2014 08:44:32 PM UTC, original submission:

(Not sure if I fully understand dlmread's behavior but here goes:)

File imp2a.txt:

aaaa 11
bbbb
cccc 33

(note trailing space on L.2 after bbbb)

Note the only difference is an empty delimiter in the second call.
dlmread's behavior for this case of an empty delimiter isn't described in dlmread's help. I suppose it's meant, like in Matlab, to treat multiple consecutive spaces as one delimiter.

Now consider file imp2b.txt:

aaaa 11
bbbb
cccc 33

(same as imp2a.txt but now w/o trailing space on L.2)

Here, both dlmread calls (with empty and with space delimiter) yield results I didn't expect (hope for).

As to ML: that doesn't have the 'emptyvalue' parameter; calling dlmread (w/o 'emptyvalue' parameter) in ML gets me
11
0
33
for all four cases above.

Background: I'm trying to get importdata.m more ML-compatible. To that end, dlmread should return proper NA values when called with '"emptyvalue", NA' and an empty delimiter.
The importdata.m incompatibility is this:

Octave:

where ML r2014a gives:

Philip Nienhuis <philipnienhuis>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by philipnienhuis (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
    Sun 23 Oct 2016 09:34:05 PM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sun 23 Oct 2016 02:54:34 PM UTCrik5Dependencies-=>Depends on bugs #42025

    Back to the top


    Powered by Savane 3.1-cleanup1