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

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

[Octave-bug-tracker] [bug #50574] error: operator =: no conversion for a


From: Rik
Subject: [Octave-bug-tracker] [bug #50574] error: operator =: no conversion for assignment of 'scalar' to indexed 'float complex scalar'
Date: Sat, 18 Mar 2017 13:06:05 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Update of bug #50574 (project octave):

                Category:                    None => Libraries              
                  Status:                    None => Confirmed              
                 Summary: Single complex median error: no conversion for
assignment  => error: operator =: no conversion for assignment of 'scalar' to
indexed 'float complex scalar'

    _______________________________________________________

Follow-up Comment #2:

Confirmed.  Octave is missing a conversion template.

A simpler method to reproduce is


x = single (0+1i);
typeinfo (x)
ans = float complex scalar
x(1) = NaN;
error: operator =: no conversion for assignment of 'scalar' to indexed 'float
complex scalar'


The corresponding method of assigning assigning to doubles works


x = 0+1i;
typeinfo (x)
ans = complex scalar
x(1) = single (NaN);
typeinfo (x)
ans = scalar


The error message is quite specific and quite accurate.  It is the conversion
of a double scalar to an indexed 'float complex scalar' that is missing.  The
conversion to a 'float matrix' exists and works correctly.


x = single ([i, 2i]);
typeinfo (x)
ans = float complex matrix
x(1) = single (NaN)
x =

   NaN +   0i     0 +   2i
typeinfo (x)
ans = float complex matrix




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50574>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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