bugGNU Octave - Bugs: bug #48649, parse error with symbolic matrices

 
 

bug #48649: parse error with symbolic matrices

Submitter:  None
Submitted:  Thu 28 Jul 2016 02:49:47 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Duplicate Assigned to:  None
Originator Name:  Ian Bruce Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.0.3
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 15 Aug 2016 03:50:16 AM UTC, comment #2: 

Also known to Symbolic: https://github.com/cbm755/octsympy/issues/8

But cannot be worked around: needs to be fixed in core Octave.

Colin Macdonald <cbm>
Thu 28 Jul 2016 07:17:44 PM UTC, comment #1: 

Thanks for your bug report. This is not a parser error, but rather a typecasting error. I think this is actually bug #42282, which was reported some time ago but has not been fixed.

A simpler example:


>> x = [sym(1), 0; 0, 1]
error: octave_base_value::map_value(): wrong type argument 'scalar'


You can work around this by making sure at least one element of every row in the matrix is of the desired type:


>> x = [sym(1), 0; 0, sym(1)]
x = (sym 2×2 matrix)

  ⎡1  0⎤
  ⎢    ⎥
  ⎣0  1⎦



Closing as a duplicate of bug #42282.

Mike Miller <mtmiller>
Group Member
Thu 28 Jul 2016 02:49:47 AM UTC, original submission:  

transcript:


GNU Octave, version 4.0.3
Copyright (C) 2016 John W. Eaton and others.

Octave was configured for "x86_64-pc-linux-gnu".

>> pkg load symbolic
>>
>> syms a b c d e f g m
OctSymPy v2.4.0: this is free software without warranty, see source.
Initializing communication with SymPy using a popen2() pipe.
Some output from the Python subprocess (pid 6055) might appear next.
Python 2.7.12 (default, Jun 29 2016, 08:18:26)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> >>>
OctSymPy: Communication established.  SymPy v1.0.
>>
>> m = [ 1 2 3 ; 4 5 6 ; 7 8 9 ]
m =

   1   2   3
   4   5   6
   7   8   9

>> m = [ a c e ; b d f ; g g g ]
m = (sym 3×3 matrix)

  ⎡a  c  e⎤
  ⎢       ⎥
  ⎢b  d  f⎥
  ⎢       ⎥
  ⎣g  g  g⎦

>> m = [ a c e ; b d f ; g g 1 ]
m = (sym 3×3 matrix)

  ⎡a  c  e⎤
  ⎢       ⎥
  ⎢b  d  f⎥
  ⎢       ⎥
  ⎣g  g  1⎦

>> m = [ a c e ; b d f ; 0 g 1 ]
m = (sym 3×3 matrix)

  ⎡a  c  e⎤
  ⎢       ⎥
  ⎢b  d  f⎥
  ⎢       ⎥
  ⎣0  g  1⎦

>> m = [ a c e ; b d f ; g 0 1 ]
m = (sym 3×3 matrix)

  ⎡a  c  e⎤
  ⎢       ⎥
  ⎢b  d  f⎥
  ⎢       ⎥
  ⎣g  0  1⎦

>> m = [ a c e ; b d f ; 0 0 1 ]
error: octave_base_value::map_value(): wrong type argument 'scalar'
error: octave_base_value::parent_class_name_list(): wrong type argument 'scalar'
>>


Why is this an error?


>> m = [ 1 2 3 ; 4 5 6 ; g g g ]
error: octave_base_value::map_value(): wrong type argument 'scalar'
error: octave_base_value::parent_class_name_list(): wrong type argument 'scalar'
error: octave_base_value::parent_class_name_list(): wrong type argument 'scalar'
>>


Or this?

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by cbm (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    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
    2016-07-28 mtmiller StatusNone Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #42282

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code