def check_op(self, op):
        """Check unary operation for success.

        Check the one- and two-arg ufunc versions as well as the method
        version attached to a LocalArray.
        """
        x = da.ones((16, 16), dist=("b", "n"), comm=self.comm)
        y = da.ones((16, 16), dist=("b", "n"), comm=self.comm)
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", category=RuntimeWarning)
            result0 = op(x, casting="unsafe")  # standard form
            op(x, y=y, casting="unsafe")  # two-arg form
        assert_array_equal(result0.local_array, y.local_array)
 def test_ones(self):
     size = self.get_comm_size()
     nrows = size * 3
     a = dla.ones((nrows, 20), comm=self.comm)
     expected = np.ones((nrows / size, 20))
     assert_array_equal(a.local_array, expected)