def test_precision_recall(backend_default):
    be = NervanaObject.be
    be.bsz = 4
    preds = np.array([[0, 1, 0, 1], [1, 0, 0, 0], [0, 0, 1, 0]])
    targets = np.array([[0, 1, 0, 1], [1, 0, 1, 0], [0, 0, 0, 0]])
    expected_result = 3. / np.array([1 + 1 + 0, 1 + 0.5 + 0])
    compare_metric(PrecisionRecall(3), preds, targets, expected_result, tol=1e-6)
dataset/ETHPy150Open NervanaSystems/neon/tests/test_costs.py/test_precision_recall/swapped operands of `/`