(self)
| 523 | Variable.concat([v[:, 0], v[:, 1:]], "x") |
| 524 | |
| 525 | def test_concat_attrs(self): |
| 526 | # always keep attrs from first variable |
| 527 | v = self.cls("a", np.arange(5), {"foo": "bar"}) |
| 528 | w = self.cls("a", np.ones(5)) |
| 529 | expected = self.cls( |
| 530 | "a", np.concatenate([np.arange(5), np.ones(5)]) |
| 531 | ).to_base_variable() |
| 532 | expected.attrs["foo"] = "bar" |
| 533 | assert_identical(expected, Variable.concat([v, w], "a")) |
| 534 | |
| 535 | def test_concat_fixed_len_str(self): |
| 536 | # regression test for #217 |
nothing calls this directly
no test coverage detected