transfrom to dense representation in sparse package
correct a bug for apply-generic
testing script for sparse+sparse and dense+sparse