 
 (deftype ComplexArray [real imag]
   mp/PImplementation
-  (implementation-key [m]  ;; in this case, 'm' takes the place of the more typical 'this'
+  (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"})

    (cond
      (number? a) (ComplexArray. (mp/scale (clojure.core.matrix.complex/real m) a)
                                 (mp/scale (clojure.core.matrix.complex/imag m) 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"
  ([r]
   (cond
     (complex? r) r
     (number? r) (c/complex-number r)
     (mp/get-shape r) (complex-array r)
     :else (error "Unable to coerce to complex value: " r)))
  ([r i]
   (cond
     (and  (number? r) (number? i)) (c/complex-number r i)
     :else (error "Unable to coerce to complex value: " r i))))

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