def applyfunc(self, f):
        if not callable(f):
            raise TypeError("`f` must be callable.")

        out = self._new(self.rows, self.cols, list(map(f, self._mat)))
        return out
Test that the correct result is returned for a simple dataset.
dataset/ETHPy150Open sympy/sympy/sympy/matrices/dense.py/DenseMatrix.applyfunc--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/DataflowPythonSDK/google/cloud/dataflow/examples/cookbook/filters_test.py/FiltersTest.test_basic