fix for `ValueError`
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
@@ -72,8 +72,10 @@ class TestNPUtils(tf.test.TestCase):
self.assertTrue(np.all(np.logical_or(ordinal == 0, ordinal == 1)))
# Get original labels back from ordinal matrix
self.assertTrue(
+ np.all(
ordinal.cumprod(-1).sum(-1).reshape(label.shape) == label
)
+ )
if __name__ == "__main__":
