> The object will not pickle.

You are right, I forgot about that.

> Also, I'd rather not create a separate function for the dense and sparse cases. It prevents you from sharing computations and in many cases a few if statements here and there suffice.

Ok