def test_out_ufunc(self): data_matrix = np.arange(15.).reshape(3, 5) data_matrix_copy = np.copy(data_matrix) fd = FDataGrid(data_matrix) np.sqrt(fd, out=fd) fd_sqrt_build = FDataGrid(np.sqrt(data_matrix_copy)) self.assertTrue(fd.equals(fd_sqrt_build))
def test_copy_equals(self): fd = FDataGrid([[1, 2, 3, 4, 5], [2, 3, 4, 5, 6]]) self.assertTrue(fd.equals(fd.copy()))