Exemplo n.º 1
0
def test_crossintray_dim_fail(outdim):
    """Test crossintray dim exception"""
    with pytest.raises(IndexError):
        fx.crossintray(outdim)
Exemplo n.º 2
0
def test_crossintray_bound_fail(outbound):
    """Test crossintray bound exception"""
    with pytest.raises(ValueError):
        x = outbound(b["crossintray"].low, b["crossintray"].high, size=(3, 2))
        fx.crossintray(x)
def test_crossintray_output_size(common_minima2, targetdim):
    """Test crossintray output size."""
    assert fx.crossintray([-10, 0] * common_minima2).shape == targetdim
Exemplo n.º 4
0
def test_crossintray_output(x, minima):
    """Tests crossintray function output."""
    assert np.isclose(fx.crossintray(x), minima).all()