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

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

[Octave-bug-tracker] [bug #59607] containers.Map values method fails wit


From: A.R. Burgers
Subject: [Octave-bug-tracker] [bug #59607] containers.Map values method fails with "." notation and cellstr indexing
Date: Wed, 2 Dec 2020 17:04:32 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.67 Safari/537.36 Edg/87.0.664.52

URL:
  <https://savannah.gnu.org/bugs/?59607>

                 Summary: containers.Map values method fails with "." notation
and cellstr indexing
                 Project: GNU Octave
            Submitted by: arb
            Submitted on: Wed 02 Dec 2020 10:04:30 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: dev
         Discussion Lock: Any
        Operating System: Any

    _______________________________________________________

Details:

In the example below M.values(keySet) fails, while values(M, keySet) succeeds,
in all of octave 5.2, 6.1, 7.0. In matlab both forms work.

Apparently in octave first v=M.values is evaluated, and then v(keySet) fails.


months = {'Jan', 'Feb', 'Mar', 'Apr'};
Tamb = [10, 11, 15, 18];
M = containers.Map(months, Tamb);
keySet = {'Jan', 'Feb'};
valueSet = values(M, keySet)
valueSet = M.values(keySet)


output:


valueSet =
{
  [1,1] =  10
  [1,2] =  11
}

error: index (<cell>): subscripts must be either integers 1 to (2^31)-1 or
logicals
error: called from
    subsref at line 399 column 14
    xx at line 6 column 10






    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59607>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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