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

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

[Octave-bug-tracker] [bug #60784] Inconsistent behavior for boolean matr


From: anonymous
Subject: [Octave-bug-tracker] [bug #60784] Inconsistent behavior for boolean matrix types with matrix functions
Date: Tue, 15 Jun 2021 21:36:02 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0

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

                 Summary: Inconsistent behavior for boolean matrix types with
matrix functions
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Wed 16 Jun 2021 01:36:01 AM 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:

If A is a boolean matrix, then most matrix operations like addition,
multiplication, exponentiation, det(A), inv(A), svd(A), lu(A) etc are OK (the
matrix gets converted to numerical type first; certain functions only apply to
square matrices of course) but other operations like eig(A) cause type errors
that they won't work on boolean matrices.

Is there a rationale for which functions require a strictly floating point
numeric type and which ones will do the conversion automatically?

This behavior was encountered when calculating the eigenvalues of a graph's
adjacency matrix which was a 0/1 logical type. It was worked around with
"eig(double(A))" but it would be nice if all matrix functions behaved the same
in whether they accept boolean input or not.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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