def test_get_class_count_other_non_empty(self):
        
        other_clname = 'foo'
        n, num_classes = self.l.shape
        # append label vector for 'other' class
        labls = np.vstack((self.l,
                           np.zeros((n*2, num_classes), dtype=self.l.dtype)))
        counts = Balancer(labls).get_class_count(other_clname=other_clname)
        assert_is_instance(counts, dict, "Unexpected return instance type.")
        assert_equals(len(counts.keys()), self.l.shape[-1]+1,
                      "Expecting a key for each class + 1 for 'other'.")
        
        assert_in(other_clname, counts.keys())
        
        for key in counts.keys():
            if key == other_clname:
                assert_equals(counts[key], n*2,
                              (other_clname,) % "Unexpected count for '%s' class")
            else:
                assert_equals(counts[key], np.sum(self.l[:, int(key)]),
                              "Unexpected count for class '%s'" % (key,))
dataset/ETHPy150Open kashefy/nideep/nideep/datasets/test_balance.py/TestBalancer.test_get_class_count_other_non_empty/swapped operands of `%`