How to use the pyswarms.utils.functions.single_obj.bukin6 function in pyswarms

To help you get started, weโ€™ve selected a few pyswarms examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ljvmiranda921 / pyswarms / tests / utils / functions / test_singleobj_return.py View on Github external
def test_bukin6_output(common_minima2):
    """Test bukin function output."""
    assert np.isclose(fx.bukin6([-10, 1] * common_minima2), np.zeros(3)).all()
github ljvmiranda921 / pyswarms / tests / utils / functions / test_singleobj_dims.py View on Github external
def test_bukin6_dim_fail(outdim):
    """Test bukin6 dim exception"""
    with pytest.raises(IndexError):
        fx.bukin6(outdim)
github ljvmiranda921 / pyswarms / tests / utils / functions / test_singleobj_returndims.py View on Github external
def test_bukin6_output_size(common_minima2, targetdim):
    """Test bukin6 output size."""
    assert fx.bukin6([-10, 0] * common_minima2).shape == targetdim
github ljvmiranda921 / pyswarms / tests / utils / functions / test_singleobj_bounds.py View on Github external
def test_bukin6_bound_fail(x):
    """Test bukin6 bound exception"""
    with pytest.raises(ValueError):
        fx.bukin6(x)