Skip to content

Commit

Permalink
MAINT: Rename compat variable
Browse files Browse the repository at this point in the history
Rename for consistency
  • Loading branch information
bashtage committed May 1, 2019
1 parent 0abbdac commit 5d42380
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions statsmodels/compat/numpy.py
Expand Up @@ -41,15 +41,13 @@

from __future__ import absolute_import
from distutils.version import LooseVersion
import numpy as np

from distutils.version import LooseVersion

import numpy as np

from .python import PY3

NP_LT_114 = LooseVersion(np.__version__) < LooseVersion('1.14')
NUMPY_LT_113 = LooseVersion(np.__version__) < '1.13.0'
NP_LT_113 = LooseVersion(np.__version__) < '1.13.0'

np_matrix_rank = np.linalg.matrix_rank
np_new_unique = np.unique
Expand Down
4 changes: 2 additions & 2 deletions statsmodels/genmod/tests/results/results_glm.py
Expand Up @@ -8,7 +8,7 @@
import numpy as np
import pandas as pd
from statsmodels.compat.python import asbytes
from statsmodels.compat.numpy import NUMPY_LT_113
from statsmodels.compat.numpy import NP_LT_113
from . import glm_test_resids
import os
from statsmodels.api import add_constant, categorical
Expand Down Expand Up @@ -692,7 +692,7 @@ def __init__(self):
"stata_lbw_glm.csv")

# https://github.com/statsmodels/statsmodels/pull/4432#issuecomment-379279617
if NUMPY_LT_113 or PY2:
if NP_LT_113 or PY2:
with open(filename, 'rb') as datafile:
data=np.recfromcsv(datafile)
vfunc = np.vectorize(lambda x: x.strip(asbytes("\"")))
Expand Down

0 comments on commit 5d42380

Please sign in to comment.