bugGNU Octave - Bugs: bug #58366, [octave forge] (symbolic) equality...

 
 

bug #58366: [octave forge] (symbolic) equality element by element assignment produces Python exception

Submitter:  Nicholas Jankowski <nrjank>
Submitted:  Wed 13 May 2020 07:28:26 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Duplicate Assigned to:  None
Originator Name:  Nicholas Jankowski Open/Closed:  * Closed
Release:  * 5.2.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 04 Jan 2021 06:58:00 PM UTC, comment #2: 

I see that a patch for this was pushed last year over on the package repository. this bug report can probably be closed.

Nicholas Jankowski <nrjank>
Group Member
Wed 13 May 2020 07:39:08 PM UTC, comment #1: 

missed the link for the stackexchange post:
https://stackoverflow.com/questions/61667621/octave-symbolic-error-cannot-determine-truth-value

also crossposted on symbolic package github:
https://github.com/cbm755/octsympy/issues/1021


and for maximum information entropy, here was a quick help list post before creating the bug:
https://octave.1599824.n4.nabble.com/symbolic-unable-to-assign-equality-to-matrix-tp4697121.html

Nicholas Jankowski <nrjank>
Group Member
Wed 13 May 2020 07:28:26 PM UTC, original submission:  

As first evidenced in a stackexchange post [1], making an element by element assignment produces an error, apparently dependent on the assignment order. here's a simpler example than at stackexchange that causes the same error:


runs fine in Matlab 2020a:

>> syms a b c d
>> e = [a == b, c == d]
e =
[ a == b, c == d]
>> f(1) = a==b
f =
a == b
>> f(2) = c==d
f =
[ a == b, c == d]
>> g(2) = c==d
g =
[ 0, c == d]
>> g(1) = a==b
g =
[ a == b, c == d]
>> h(2) = c==d
h =
[ 0, c == d]
>> h(1) = a==b
h =
[ a == b, c == d]
>> h(3) = a==c
h =
[ a == b, c == d, a == c]


output from Octave 5.2.0, Windows 10, with Symbolic 2.9.0 (and unbundled Python 3.7):

>> pkg load symbolic
>> syms a b c d
Symbolic pkg v2.9.0: Python communication link active, SymPy v1.3.
>> e = [a == b, c == d]
e = (sym) [a = b  c = d]  (1x2 matrix)
>> f(1) = a==b
f = (sym) a = b
>> f(2) = c==d
error: Python exception: TypeError: cannot determine truth value of Relational
    occurred at line 7 of the Python code block:
    if not A or not A.is_Matrix:
error: called from
    pycall_sympy__ at line 178 column 7
    mat_rclist_asgn at line 78 column 5
    mat_replace at line 144 column 5
    subsasgn at line 101 column 13
>> g(2) = c==d
g = (sym) [0  c = d]  (1x2 matrix)
>> g(1) = a==b
g = (sym) [a = b  c = d]  (1x2 matrix)
>> h(2) = c==d
h = (sym) [0  c = d]  (1x2 matrix)
>> h(1) = a==b
h = (sym) [a = b  c = d]  (1x2 matrix)
>> h(3) = a==c
h = (sym) [a = b  c = d  a = c]  (1x3 matrix)


not sure what unique case is occurring under the hood when it goes from size 1->2, but the error doesn't reoccur at size 2->3.

Nicholas Jankowski <nrjank>
Group Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by siko1056 (Updated the item)
  • -email is unavailable- added by nrjank (Submitted the item)
  • -email is unavailable- added by nrjank (package maintainer)
  •  

    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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-01-05 siko1056 StatusNone Duplicate
        Open/ClosedOpen Closed
    2020-05-13 nrjank Carbon-Copy- Added cbm

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code