from smooth_curve import smooth_curve

import numpy as np

P = np.array([[24, 40, 36, 44, 28, 18, 12, 0,  8,  4],
              [12, 16,  8,  4,  0,  4,  0, 4, 12, 16]])
returned = smooth_curve(P, 0.5)
expected = np.array([[23. , 35. , 39. , 38. , 29.5, 19. , 10.5,  5. ,  5. , 10. ],
                  [14. , 13. ,  9. ,  4. ,  2. ,  2. ,  2. ,  5. , 11. , 14. ]])

if not np.array_equal(returned, expected):
    print('Test for smooth curve failed because returned was:')
    print(repr(returned))
    print('instead of:')
    print(repr(expected))
else:
    print('Test for smooth curve passed')