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

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

[Octave-bug-tracker] [bug #50854] zeros, ones, NaN, Inf, NA: "like" keyw


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #50854] zeros, ones, NaN, Inf, NA: "like" keyword
Date: Fri, 24 Apr 2020 14:12:03 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0

Update of bug #50854 (project octave):

              Item Group:          WTF, Matlab?!? => Matlab Compatibility   
                 Release:                   4.2.1 => dev                    
        Operating System:               GNU/Linux => Any                    
                 Summary:     zeros: like keyword => zeros, ones, NaN, Inf,
NA: "like" keyword

    _______________________________________________________

Follow-up Comment #16:

The patch from comment #15 still applies on the current default branch and
compiles successfully.
However, it doesn't seem to work for complex single "like" input:

>> a = ones (1, 1, "like", single (1i))
a = 1
>> whos ("a")
Variables visible from the current scope:

variables in scope: top scope

   Attr Name        Size                     Bytes  Class
   ==== ====        ====                     =====  =====
        a           1x1                          8  double

Total is 1 element using 8 bytes


The returned value is double when it should be single.

I hope the attached patch fixes that.

I'm not sure if it is worth leaving the "iscomplex" logic in since Octave
seems to happily eat the imaginary part of complex numbers whenever it can
anyway.

Documentation changes are still missing. I would be happy if you could take
that on, Guillaume.

(file #48927)
    _______________________________________________________

Additional Item Attachment:

File name: bug50854_patch_like_v2.patch   Size:10 KB
    <https://savannah.gnu.org/file/bug50854_patch_like_v2.patch?file_id=48927>



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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