def ctimes(*args):
n = len(args)<EOL>if   n == <NUM_LIT:0>: return np.asarray(<NUM_LIT:0>)<EOL>elif n == <NUM_LIT:1>: return np.asarray(args[<NUM_LIT:0>])<EOL>elif n >  <NUM_LIT:2>: return reduce(plus, args)<EOL>(a,b) = args<EOL>if   sps.issparse(a): return a.multiply(b)<EOL>elif sps.issparse(b): return b.multiply(a)<EOL>else:                 return np.asarray(a) * b<EOL>
ctimes(a, b...) returns the product of all the values as a numpy array object. Like numpy's
  multiply function or a*b syntax, times will thread over the latest dimension possible; thus
  if a.shape is (4,2) and b.shape is 2, times(a,b) is a equivalent to a * b.

Unlike numpy's multiply function, ctimes works with sparse matrices and will reify them.