changeset 21372:a1aa52bff079

Allow bsxfun to work for sparse and type conversion (bug #45219, bug #40089). * bsxfun.cc (Fbsxfun): Initialise the fall-back variable C for sparse too.
author Lachlan Andrew <lachlanbis@gmail.com>
date Sat, 16 Jan 2016 20:52:47 +1100
parents dc3252099232
children 21c3641422e0
files libinterp/corefcn/bsxfun.cc
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/bsxfun.cc	Wed Feb 24 20:16:20 2016 +1100
+++ b/libinterp/corefcn/bsxfun.cc	Sat Jan 16 20:52:47 2016 +1100
@@ -518,6 +518,11 @@
                           C = C.resize (dvc);
                         }
                     }
+                  else  // Skip semi-fast path for sparse matrices
+                    {
+                      C = tmp (0);
+                      C = C.resize (dvc);
+                    }
                 }
               else
                 {