Helper function used to implement the `` add`` functions.
(c1, c2)
| 553 | |
| 554 | |
| 555 | def _add(c1, c2): |
| 556 | """ Helper function used to implement the ``<type>add`` functions. """ |
| 557 | # c1, c2 are trimmed copies |
| 558 | [c1, c2] = as_series([c1, c2]) |
| 559 | if len(c1) > len(c2): |
| 560 | c1[:c2.size] += c2 |
| 561 | ret = c1 |
| 562 | else: |
| 563 | c2[:c1.size] += c1 |
| 564 | ret = c2 |
| 565 | return trimseq(ret) |
| 566 | |
| 567 | |
| 568 | def _sub(c1, c2): |