import math

def f1(x):
    """
    Test function 1
    """
    return x*x*x - math.pi*x + math.e/100

import numpy as npy

def f1(x):
    """
    Test function 1
    """
    return x*x*x - npy.pi*x + npy.e/100

def f2(x):
    """
    Test function 2
    """
    return -1.13 + npy.tanh(x-2) + 4*npy.exp(-x)*npy.sin((1/8.)*x**3) \
           *x + .1*npy.exp((1/35.)*x)
Use numpy instead of math to allow vectorization
Use numpy instead of math to allow vectorization

- import math
+ import numpy as npy
  
  def f1(x):
      """
      Test function 1
      """
-     return x*x*x - math.pi*x + math.e/100
+     return x*x*x - npy.pi*x + npy.e/100
  
+ def f2(x):
+     """
+     Test function 2
+     """
+     return -1.13 + npy.tanh(x-2) + 4*npy.exp(-x)*npy.sin((1/8.)*x**3) \
+            *x + .1*npy.exp((1/35.)*x)
Use numpy instead of math to allow vectorization
## Code Before:
import math

def f1(x):
    """
    Test function 1
    """
    return x*x*x - math.pi*x + math.e/100

## Instruction:
Use numpy instead of math to allow vectorization
## Code After:
import numpy as npy

def f1(x):
    """
    Test function 1
    """
    return x*x*x - npy.pi*x + npy.e/100

def f2(x):
    """
    Test function 2
    """
    return -1.13 + npy.tanh(x-2) + 4*npy.exp(-x)*npy.sin((1/8.)*x**3) \
           *x + .1*npy.exp((1/35.)*x)