fine. But if it (mainly the function option) is something
> that merely might be useful to someone someday, then I
> suggest it be left out until there is a clear need. (My 2
> cents-worth, or less.)
sounds good
> Curiosity questions about implementation:
> 1) What is the "tocoo" method, and what objects have it? 2)
If someone is already using a sparse matrix from scipy.sparse, it's a
lot more efficient to use the sparse matrix functionality than to do
the sparsity check myself
Help on class coo_matrix in module scipy.sparse.sparse:
class coo_matrix(spmatrix)
> A sparse matrix in coordinate list format.
>
> COO matrices are created either as:
> A = coo_matrix(None, dims=(m, n), [dtype])
> for a zero matrix, or as:
> A = coo_matrix((obj, ij), [dims])
> where the dimensions are optional. If supplied, we set (M, N) =
> dims.
> If not supplied, we infer these from the index arrays
> ij[0][:] and ij[1][:]
>
> The arguments 'obj' and 'ij' represent three arrays:
> 1. obj[:] the entries of the matrix, in any order
> 2. ij[0][:] the row indices of the matrix entries
> 3. ij[1][:] the column indices of the matrix entries
>
> So the following holds:
> A[ij[0][k], ij[1][k] = obj[k]
> Is there a reason why one shouldn't simply default precision
> to 0 and use the condition "absolute(asarray(Z)) <=
> precision"?
Minor performance issue since thisapproach requires two passes
through the data whereas mine takes one when precision=None
> One more miscellaneous thought: perhaps spy and spy2 should
> be consolidated into a single function with a kwarg to
> select the marker version or the image version? Their
> purpose is identical (isn't it?), and it would reduce
> namespace clutter.
Fine by me -- if you want to implement it
JDH