diff libinterp/corefcn/bsxfun.cc @ 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 12280fef2741
children ecce63c99c3f
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
                 {