From fabcd161b3dfb0c634fec70b6b6acc86087ee91f Mon Sep 17 00:00:00 2001 From: Tom Pollard Date: Wed, 6 May 2020 13:49:27 -0400 Subject: [PATCH] fix import --- tableone/__init__.py | 1 - tableone/tableone.py | 2 +- test_tableone.py | 14 +++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/tableone/__init__.py b/tableone/__init__.py index 3cec6ed..67ce749 100644 --- a/tableone/__init__.py +++ b/tableone/__init__.py @@ -1,6 +1,5 @@ # Import tableone objects from .tableone import TableOne -from .modality import hartigan_diptest __author__ = "Tom Pollard , Alistair Johnson, Jesse Raffa" __version__ = "0.7.3" \ No newline at end of file diff --git a/tableone/tableone.py b/tableone/tableone.py index 85a20e7..cf6d990 100644 --- a/tableone/tableone.py +++ b/tableone/tableone.py @@ -12,7 +12,7 @@ from statsmodels.stats import multitest from tabulate import tabulate -from tableone import hartigan_diptest +from tableone.modality import hartigan_diptest # display deprecation warnings warnings.simplefilter('always', DeprecationWarning) diff --git a/test_tableone.py b/test_tableone.py index 07d29f1..45dbffe 100644 --- a/test_tableone.py +++ b/test_tableone.py @@ -4,13 +4,13 @@ from nose.tools import (with_setup, assert_raises, assert_equal, assert_almost_equal) import numpy as np -import modality import pandas as pd from scipy import stats import tableone from tableone import TableOne from tableone.tableone import InputError +from tableone.modality import hartigan_diptest, generate_data def mytest(*args): @@ -297,16 +297,16 @@ def test_hartigan_diptest_for_modality(self): Ensure that the package runs Fisher exact if cell counts are <=5 and it is a 2x2 """ - dist_1_peak = modality.generate_data(peaks=1, n=[10000]) - t1 = modality.hartigan_diptest(dist_1_peak) + dist_1_peak = generate_data(peaks=1, n=[10000]) + t1 = hartigan_diptest(dist_1_peak) assert t1 > 0.95 - dist_2_peak = modality.generate_data(peaks=2, n=[10000, 10000]) - t2 = modality.hartigan_diptest(dist_2_peak) + dist_2_peak = generate_data(peaks=2, n=[10000, 10000]) + t2 = hartigan_diptest(dist_2_peak) assert t2 < 0.05 - dist_3_peak = modality.generate_data(peaks=3, n=[10000, 10000, 10000]) - t3 = modality.hartigan_diptest(dist_3_peak) + dist_3_peak = generate_data(peaks=3, n=[10000, 10000, 10000]) + t3 = hartigan_diptest(dist_3_peak) assert t3 < 0.05 @with_setup(setup, teardown)