def czdivide(a, b, null=<NUM_LIT:0>):
if null == <NUM_LIT:0>:         return a.multiply(zinv(b)) if sps.issparse(a) else a * zinv(b)<EOL>elif sps.issparse(b): b = b.toarray()<EOL>else:                 b = np.asarray(b)<EOL>z = np.isclose(b, <NUM_LIT:0>)<EOL>q = np.logical_not(z)<EOL>zi = q / (b + z)<EOL>if sps.issparse(a):<EOL><INDENT>r = a.multiply(zi).tocsr()<EOL><DEDENT>else:<EOL><INDENT>r = np.asarray(a) * zi<EOL><DEDENT>r[np.ones(a.shape, dtype=np.bool)*z] = null<EOL>return r<EOL>
czdivide(a, b) returns the quotient a / b as a numpy array object. Like numpy's divide function
  or a/b syntax, czdivide will thread over the latest dimension possible. Unlike numpy's divide,
  czdivide works with sparse matrices. Additionally, czdivide multiplies a by the zinv of b, so
  divide-by-zero entries are replaced with 0 in the result.

The optional argument null (default: 0) may be given to specify that zeros in the arary b should
instead be replaced with the given value in the result. Note that if this value is not equal to
0, then any sparse array passed as argument b must be reified.

The czdivide function never raises an error due to divide-by-zero; if you desire this behavior,
use the cdivide function instead.