Skip to content

vertcat: does not show error message for incompatible columns #1238

Open
@cbm755

Description

@cbm755

In Array_and_Matrix branch:

%!error
%! z03 = sym (zeros (0, 3));
%! z04 = sym (zeros (0, 4));
%! [z03; z04]

This test passes. It is an error. But the error message is not shown:

octave:43> [z03; z04]
pydebug: vertcat: all inputs must have the same number of columns
error: sym/vertcat method failed
error: called from
    pycall_sympy__ at line 179 column 7
    vertcat at line 67 column 5

The thing shown in pydebug should be the error message---here just hacked to show up:

          'ncols = [number_of_columns(x) for x in args]'
          'if not all_equal(*ncols):'
          '    msg = "vertcat: all inputs must have the same number of columns"'
+        '    dbout(msg)'
          '    raise ShapeError(msg)'
          'CCC = [as_list_of_list(x) for x in args]'
          'CC = flatten(CCC, levels=1)'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions