diff --git a/big_o/big_o.py b/big_o/big_o.py
index 1dbeae4..61f40b8 100755
--- a/big_o/big_o.py
+++ b/big_o/big_o.py
@@ -70,7 +70,7 @@ def infer_big_o_class(ns, time, classes=ALL_CLASSES, verbose=False):
 
     ns -- Array of values of N for which execution time has been measured.
 
-    time -- Array of execution times for each N in `ns`.
+    time -- Array of execution times for each N in seconds.
 
     classes -- The complexity classes to consider. This is a list of subclasses
                of `big_o.complexities.ComplexityClass`.
diff --git a/big_o/complexities.py b/big_o/complexities.py
index 6319949..0b9c4a9 100755
--- a/big_o/complexities.py
+++ b/big_o/complexities.py
@@ -24,7 +24,7 @@ class ComplexityClass(object):
 
         n -- Array of values of N for which execution time has been measured.
 
-        t -- Array of execution times for each N in `ns`.
+        t -- Array of execution times for each N in seconds.
 
         Output:
         -------
@@ -55,7 +55,7 @@ class ComplexityClass(object):
 
         if self.coeff is None:
             return prefix + ': not yet fitted'
-        return prefix + self.format_str().format(*tuple(self.coeff))
+        return prefix + self.format_str().format(*tuple(self.coeff)) + ' (sec)'
 
     # --- abstract methods
 

Add units to string representation
The formulas printed with the complexity classes have no reference units.
Consider rescaling coefficients to milliseconds instead of seconds.
diff --git a/big_o/test/test_complexities.py b/big_o/test/test_complexities.py
index 3935c88..4de6035 100644
--- a/big_o/test/test_complexities.py
+++ b/big_o/test/test_complexities.py
@@ -17,3 +17,11 @@ class TestComplexities(unittest.TestCase):
     def test_not_fitted(self):
         linear = complexities.Linear()
         self.assertRaises(complexities.NotFittedError, linear.compute, 100)
+
+    def test_str_includes_units(self):
+        x = np.linspace(10, 100, 100)
+        y = 3.0 * x + 2.0
+        linear = complexities.Linear()
+        linear.fit(x, y)
+        linear_str = str(linear)
+        assert '(sec)' in linear_str

pip install -e .
parse_log_pytest
requirements.txt
pytest
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
-e git+https://github.com/pberkes/big_O.git@ee96a8f4dc174bdd40ee49dae67307651fa1e0ce#egg=big_O
certifi==2021.5.30
importlib-metadata==4.8.3
iniconfig==1.1.1
numpy==1.19.5
packaging==21.3
pluggy==1.0.0
py==1.11.0
pyparsing==3.1.4
pytest==7.0.1
tomli==1.2.3
typing_extensions==4.1.1
zipp==3.6.0

name: big_O
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - numpy==1.19.5
      - packaging==21.3
      - pluggy==1.0.0
      - py==1.11.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - zipp==3.6.0
prefix: /opt/conda/envs/big_O

big_o/test/test_complexities.py::TestComplexities::test_str_includes_units
big_o/test/test_complexities.py::TestComplexities::test_compute big_o/test/test_complexities.py::TestComplexities::test_not_fitted
big_o/complexities.py big_o/big_o.py
big_o/complexities.py big_o/big_o.py