add functions for (DMatrix -> HMatrix Double) and back
ones -> countUp in a test