diff libinterp/octave-value/ov-flt-cx-mat.cc @ 24587:6ece7c7e4912

tolower/toupper functions return complex numbers unchanged (bug #52380). * mappers.cc (Ftolower, Ftoupper): Add BIST tests for new behavior. * ov-complex.cc (octave_complex::map): Directly return input for cases of umap_xtolower and umap_xtoupper. * ov-cx-mat.cc (octave_complex_matrix::map): Directly return input for cases of umap_xtolower and umap_xtoupper. * ov-flt-complex.cc (octave_float_complex::map): Directly return input for cases of umap_xtolower and umap_xtoupper. * ov-flt-cx-mat.cc (octave_float_complex_matrix::map): Directly return input for cases of umap_xtolower and umap_xtoupper.
author Stevie Schraudner <stevietodd@hotmail.com>
date Wed, 10 Jan 2018 17:50:13 -0500
parents 194eb4bd202b
children ab2321d4ba03
line wrap: on
line diff
--- a/libinterp/octave-value/ov-flt-cx-mat.cc	Thu Jan 11 20:30:08 2018 +0100
+++ b/libinterp/octave-value/ov-flt-cx-mat.cc	Wed Jan 10 17:50:13 2018 -0500
@@ -706,6 +706,11 @@
     case umap_conj:
       return ::conj (matrix);
 
+    // Special cases for Matlab compatibility.
+    case umap_xtolower:
+    case umap_xtoupper:
+      return matrix;
+               
 #define ARRAY_METHOD_MAPPER(UMAP, FCN)        \
     case umap_ ## UMAP:                       \
       return octave_value (matrix.FCN ())