Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8452019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:23:43+00:00 2026-06-10T11:23:43+00:00

I’ve downloaded the Python package statsmodels (using pip) and run the tests, and found

  • 0

I’ve downloaded the Python package statsmodels (using pip) and run the tests, and found several were failing out of the gate. The test command is

>>> import statsmodels.api as sm
>>> sm.test()

There are two errors and one failure:

=====================================================================
ERROR: statsmodels.sandbox.panel.test_sandwich.test_cov_cluster_2groups
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/local/lib/python2.7/site-packages/statsmodels/sandbox/panel/test_sandwich.py", line 30, in test_cov_cluster_2groups
    cov01, covg, covt = sw.cov_cluster_2groups(res, group, group2=time)
  File "/usr/local/lib/python2.7/site-packages/statsmodels/sandbox/panel/sandwich_covariance.py", line 555, in cov_cluster_2groups
    group_intersection = Group(group)
  File "/usr/local/lib/python2.7/site-packages/statsmodels/tools/grouputils.py", line 182, in __init__
    uni, uni_idx, uni_inv = combine_indices(group)
  File "/usr/local/lib/python2.7/site-packages/statsmodels/tools/grouputils.py", line 60, in combine_indices
    return_inverse=True)
  File "/usr/local/lib/python2.7/site-packages/numpy/lib/arraysetops.py", line 178, in unique
perm = ar.argsort(kind='mergesort')
TypeError: requested sort not available for type

======================================================================
ERROR: statsmodels.tsa.base.tests.test_datetools.test_infer_freq
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
  File "/usr/local/lib/python2.7/site-packages/statsmodels/tsa/base/tests/test_datetools.py", line 63, in test_infer_freq
    npt.assert_string_equal(_infer_freq(b), 'B')
  File "/usr/local/lib/python2.7/site-packages/statsmodels/tsa/base/datetools.py", line 234, in _infer_freq
    elif delta >= timedelta(28*nobs) and delta <= timedelta(31*nobs):
TypeError: ufunc 'greater_equal' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule 'safe'

======================================================================
FAIL: test_monotone_fn_inverter (statsmodels.distributions.tests.test_ecdf.TestDistributions)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/statsmodels/distributions/tests/test_ecdf.py", line 41, in test_monotone_fn_inverter
    npt.assert_array_equal(f.y, x[::1])
  File "/usr/local/lib/python2.7/site-packages/numpy/testing/utils.py", line 707, in assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "/usr/local/lib/python2.7/site-packages/numpy/testing/utils.py", line 636, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not equal

(mismatch 100.0%)
 x: array([ 15.,  14.,  13.,  12.,  11.,  10.,   9.,   8.,   7.,   6.])
 y: array([ 6,  7,  8,  9, 10, 11, 12, 13, 14, 15])

----------------------------------------------------------------------
Ran 1454 tests in 67.411s

Other possibly helpful information:

  • statsmodel v0.4.0 (also tried v0.5.0)
  • numpy v1.6.2
  • scipy v0.10.1
  • all of these packages were pip’d
  • python v2.7.3 installed on Mac OSX 10.8 using homebrew brew install python (i.e. not OSX native python).
  • I pip’d a few other packages, too: joblib v0.6.4, nose v1.1.2, and patsy v0.1.0. Nose was required for testing, and patsy is needed to import statsmodels.api. The test suite also complained that joblib was needed for running in parallel.

I’m not sure of what to make of the first two errors, and the failure looks a bit weird, kind of like an implementation change or something…but I suspect that the statsmodels guys/gals ran their tests before they called it a day 🙂 So what’s going on here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:23:44+00:00Added an answer on June 10, 2026 at 11:23 am

    Please try the latest release http://pypi.python.org/pypi/statsmodels/0.4.3

    As far as I remember, all these errors are fixed.

    The first error is a change in the behavior of numpy in 1.6.2.

    I think, the second is related to the change in datetime handling with the transition to using the new numpy dtypes in newer pandas versions.

    The last was a mistake in the test.

    The mailing list or issue tracker might be better places to report these test failures:
    http://groups.google.com/group/pystatsmodels
    https://github.com/statsmodels/statsmodels/issues

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.