()
| 521 | |
| 522 | |
| 523 | def test_broadcasting_singlerow(): |
| 524 | table = T( |
| 525 | """ |
| 526 | pet | owner | age |
| 527 | 1 | Alice | 10 |
| 528 | 1 | Bob | 9 |
| 529 | 2 | Alice | 8 |
| 530 | 1 | Bob | 7 |
| 531 | 0 | Eve | 10 |
| 532 | """ |
| 533 | ) |
| 534 | |
| 535 | row = table.reduce(val=1) |
| 536 | returned = table.select(newval=row.ix_ref().val) |
| 537 | |
| 538 | expected = T( |
| 539 | """ |
| 540 | newval |
| 541 | 1 |
| 542 | 1 |
| 543 | 1 |
| 544 | 1 |
| 545 | 1 |
| 546 | """ |
| 547 | ) |
| 548 | assert_table_equality(returned, expected) |
| 549 | |
| 550 | |
| 551 | def test_indexing_single_value_groupby(): |