예제 #1
0
def test_primes_implementations_are_correct():
    a1 = primespin.numpy_generate_primes_array(1,100)
    a2 = primespin.list_generate_primes_array(1,100)
    b = numpy.array(primes_100)
    numpy.testing.assert_equal( a1, b)
    numpy.testing.assert_equal( a2, b)
예제 #2
0
def test_primes_implementations_are_equal(first, last):
    a1 = primespin.numpy_generate_primes_array(first, last)
    a2 = primespin.list_generate_primes_array(first, last)
    numpy.testing.assert_equal( a1, a2)