Passing matrix to unary_map
custom filter, parsing and implementation