test_statistics.py 500 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. __author__ = "Christian Heider Nielsen"
  4. __doc__ = r"""
  5. Created on 17-12-2020
  6. """
  7. from draugr.numpy_utilities import root_mean_square
  8. def test_root_mean_square_signed(asad: int = 60):
  9. s = [i - asad // 2 for i in range(asad)]
  10. a = root_mean_square(s)
  11. # assert a
  12. def test_root_mean_square_unsigned(asad: int = 60):
  13. s = [i + asad // 2 for i in range(asad)]
  14. a = root_mean_square(s)
  15. # assert a == mean(s)..