Пример #1
0
 def test_thedivider(self):
     x = np.array([[
         0.,
         0.2,
         0.2,
         0.2,
         0.2,
     ], [5., 1.2, 0.7, 0.5, 0.45], [10., 2.2, 1.2, 0.8, 0.7],
                   [15., 3.2, 1.7, 1.2, 0.95], [20., 4.2, 2.2, 1.5, 1.2]])
     npt.assert_almost_equal(thedivider(), x, decimal=1)
Пример #2
0
# Program Purpose: execute a number of functions using Numpy.
# Author: Matthew T. Dunn
# Date: 11/1/15

import sys
import matplotlib.pyplot as plt
import array_module
from array_module import arraybuilder, twoDArray, thedivider, arraymath, generate_mandelbrot


try:
    question1 = twoDArray()
    question2 = thedivider()
    question3 = arraymath()
    question4 = generate_mandelbrot()
except KeyboardInterrupt, ValueError:
    print "\n Interrupted!"
except EOFError:
    print "\n Interrupted!"
Пример #3
0
 def test_thedivider(self):
     x = np.array([[0.,0.2,0.2,0.2,0.2,],[5.,1.2,0.7,0.5,0.45],[10.,2.2,1.2,0.8,0.7],[15.,3.2,1.7,1.2,0.95],[20.,4.2,2.2,1.5,1.2]])
     npt.assert_almost_equal(thedivider(), x, decimal=1)
Пример #4
0
#Program Purpose: execute a number of functions using Numpy.
#Author: Matthew T. Dunn
#Date: 11/1/15

import sys
import matplotlib.pyplot as plt
import array_module
from array_module import arraybuilder, twoDArray, thedivider, arraymath, generate_mandelbrot

try:
    question1 = twoDArray()
    question2 = thedivider()
    question3 = arraymath()
    question4 = generate_mandelbrot()
except KeyboardInterrupt, ValueError:
    print "\n Interrupted!"
except EOFError:
    print "\n Interrupted!"