Beispiel #1
0
def test_vector_is_valid():
    rn = CudaRn(5)
    weight = _pos_vector(rn)

    weighting = CudaFnVectorWeighting(weight)

    assert weighting.is_valid()

    # Invalid
    weight[0] = 0

    weighting = CudaFnVectorWeighting(weight)

    assert not weighting.is_valid()