(self, otherList)
| 648 | return |
| 649 | |
| 650 | def __mul__(self, otherList): |
| 651 | if not isinstance(otherList, ChannelsList): |
| 652 | raise TypeError('Can\'t "multiply" by other \ |
| 653 | type than a ChannelsList') |
| 654 | if len(self) > 1: |
| 655 | if len(otherList) > 1: |
| 656 | if len(self) != len(otherList): |
| 657 | raise ValueError("Both ChannelsList-like objects must \ |
| 658 | have the same number of channels.") |
| 659 | newChList = ChannelsList([self[self.mapping[idx]]* |
| 660 | otherList[otherList.mapping[idx]] |
| 661 | for idx in range(len(self))]) |
| 662 | else: |
| 663 | newChList = ChannelsList([self[self.mapping[idx]]* |
| 664 | otherList[otherList.mapping[0]] |
| 665 | for idx in range(len(self))]) |
| 666 | else: |
| 667 | if len(otherList) > 1: |
| 668 | newChList = ChannelsList([self[self.mapping[0]]*otherList[index] |
| 669 | for index in range(len(otherList))]) |
| 670 | else: |
| 671 | newChList = ChannelsList([self[self.mapping[0]]* |
| 672 | otherList[otherList.mapping[0]]]) |
| 673 | return newChList |
| 674 | |
| 675 | def __truediv__(self, otherList): |
| 676 | if not isinstance(otherList, ChannelsList): |
nothing calls this directly
no test coverage detected