octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #30289] save/load does not restore a variable


From: Olaf Till
Subject: [Octave-bug-tracker] [bug #30289] save/load does not restore a variable created with ones()
Date: Wed, 30 Jun 2010 11:36:05 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.0.19) Gecko/2010033100 Iceweasel/3.0.6 (Debian-3.0.6-3)

Follow-up Comment #2, bug #30289 (project octave):

According to src/data.cc:

            case oct_data_conv::dt_double:
              {
                if (val == 1 && dims.length () == 2 && dims (0) == 1)
                  retval = Range (1.0, 0.0, dims (1)); // packed form
                else
                  retval = NDArray (dims, val);
              }
              break;

it is intentional --- only saving is not yet handled. If this optimization is
kept and saving is changed accordingly, it will probably break backwards
compatibility of save-ed data, since the current format of saved data does not
seem to allow zero-increment ranges. Maybe there should be an "-oct3.2" switch
of the "save" command, leading to expansion of such ranges, for backwards
compatibility...

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?30289>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]