     (cond
       (number? a) (ComplexArray. (mp/scale (clojure.core.matrix.complex/real m) a)
                                  (mp/scale (clojure.core.matrix.complex/imag m) a))
+      (instance? Complex a) (ComplexArray. (mp/scale (clojure.core.matrix.complex/real m)
+                                                     (c/real-part a))
+                                           (mp/scale (clojure.core.matrix.complex/imag m)
+                                                     (c/imaginary-part a)))
       :else (error "Unable to multiply " (class a) " with a Complex value")))
   (pre-scale [m a]
     (cond


(defn complex
  "Function to coerce a value to a complex scalar or array"
  ([a]
   (cond
     (complex? a) a
     (number? a) (c/complex-number a)
     (mp/get-shape a) (complex-array a)
     :else (error "Unable to coerce to complex value: " a))))

(defn complex?
  "Predicate to test whether a value is a complex number or array supported by core.matrix.complex"


(deftype ComplexArray [real imag]
  mp/PImplementation
  (implementation-key [m]                                   ;; in this case, 'm' takes the place of the more typical 'this'
    :complex-array)
  (meta-info [m]
    {:doc "Implementation for complex arrays"})
