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

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

[Octave-bug-tracker] [bug #38466] incorrect broadcasting for 'a .*= b' w


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #38466] incorrect broadcasting for 'a .*= b' when b has fewer dimensions than a
Date: Fri, 8 Apr 2022 14:04:12 -0400 (EDT)

Follow-up Comment #23, bug #38466 (project octave):

I haven't done much testing, but maybe the attached change is the right fix? 
The same logic is applied in the is_valid_bsxfun function to handle the case
when the number of dimensions of the operands don't match, so extra dimensions
are always 1.

Note that there are different code paths in product_eq in Marray.cc if the LHS
is shared.  So maybe that is why calling disp changes the result?

It's also possible we could just see random behavior here or crashes because
of accessing dimension elements beyond the size of the allocated dimension
array.


(file #53056)

    _______________________________________________________

Additional Item Attachment:

File name: inplace-bsxfun-diff.txt        Size:0 KB
    <https://file.savannah.gnu.org/file/inplace-bsxfun-diff.txt?file_id=53056>



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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