Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_Headbanging_Median_Rate fails with Python 3.6 #948

Closed
sebastic opened this issue Jul 7, 2017 · 1 comment
Closed

test_Headbanging_Median_Rate fails with Python 3.6 #948

sebastic opened this issue Jul 7, 2017 · 1 comment
Milestone

Comments

@sebastic
Copy link
Contributor

sebastic commented Jul 7, 2017

As reported by Adrian Bunk in Debian Bug #867549:

https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/pysal.html

...
I: pybuild base:184: cd /build/1st/pysal-1.13.0/.pybuild/pythonX.Y_3.6/build; python3.6 -m nose --exclude test_DistanceBand_arc  --exclude-dir=pysal/contrib --exclude-dir pysal/network
Trying `CDLL(libgeos_c.so.1)`
Library path: 'libgeos_c.so.1'
DLL: <CDLL 'libgeos_c.so.1', handle 374a360 at 0x7fc9b3402f98>
Trying `CDLL(libc.so.6)`
Library path: 'libc.so.6'
DLL: <CDLL 'libc.so.6', handle 7fc9c85c14e0 at 0x7fc9bb88bc18>
.........../build/1st/pysal-1.13.0/.pybuild/pythonX.Y_3.6/build/pysal/cg/segmentLocator.py:117: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  if self._hashKeys == None:
...............................................................................................................................................................S....../build/1st/pysal-1.13.0/.pybuild/pythonX.Y_3.6/build/pysal/weights/weights.py:189: UserWarning: There are 3 disconnected observations
  warnings.warn("There are %d disconnected observations" % ni)
/build/1st/pysal-1.13.0/.pybuild/pythonX.Y_3.6/build/pysal/weights/weights.py:190: UserWarning: Island ids: 6, 8, 11
  warnings.warn("Island ids: %s" % ', '.join(str(island) for island in self.islands))
........./build/1st/pysal-1.13.0/.pybuild/pythonX.Y_3.6/build/pysal/core/IOHandlers/gwt.py:148: RuntimeWarning: DBF relating to GWT was not found, proceeding with unordered string ids.
  warn("DBF relating to GWT was not found, proceeding with unordered string ids.", RuntimeWarning)
......................../build/1st/pysal-1.13.0/.pybuild/pythonX.Y_3.6/build/pysal/weights/weights.py:189: UserWarning: There are 7 disconnected observations
  warnings.warn("There are %d disconnected observations" % ni)
/build/1st/pysal-1.13.0/.pybuild/pythonX.Y_3.6/build/pysal/weights/weights.py:190: UserWarning: Island ids: 5, 9, 10, 11, 12, 14, 15
  warnings.warn("Island ids: %s" % ', '.join(str(island) for island in self.islands))
........../build/1st/pysal-1.13.0/.pybuild/pythonX.Y_3.6/build/pysal/core/Tables.py:215: UserWarning: Encountered the following error in attempting to read the shapefile /build/1st/pysal-1.13.0/.pybuild/pythonX.Y_3.6/build/pysal/examples/us_income/usjoin.shp. Proceeding with read, but the error will be reproduced below:
 [Errno 2] No such file or directory: '/build/1st/pysal-1.13.0/.pybuild/pythonX.Y_3.6/build/pysal/examples/us_income/usjoin.shp'
  ' {}'.format(self.dataPath[:-3]+'shp', e))
...............................................................................FF..................................../build/1st/pysal-1.13.0/.pybuild/pythonX.Y_3.6/build/pysal/esda/moran.py:876: RuntimeWarning: invalid value encountered in greater
  zp = self.z > 0
/build/1st/pysal-1.13.0/.pybuild/pythonX.Y_3.6/build/pysal/esda/moran.py:877: RuntimeWarning: invalid value encountered in greater
  lp = zl > 0
/build/1st/pysal-1.13.0/.pybuild/pythonX.Y_3.6/build/pysal/esda/moran.py:826: RuntimeWarning: invalid value encountered in greater_equal
  above = sim >= self.Is
/usr/lib/python3/dist-packages/scipy/stats/_distn_infrastructure.py:875: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/usr/lib/python3/dist-packages/scipy/stats/_distn_infrastructure.py:875: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/usr/lib/python3/dist-packages/scipy/stats/_distn_infrastructure.py:1731: RuntimeWarning: invalid value encountered in greater_equal
  cond2 = (x >= self.b) & cond0
................................
======================================================================
FAIL: test_Headbanging_Median_Rate (pysal.esda.tests.test_smoothing.TestHB)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/1st/pysal-1.13.0/.pybuild/pythonX.Y_3.6/build/pysal/esda/tests/test_smoothing.py", line 301, in test_Headbanging_Median_Rate
    np.testing.assert_array_almost_equal(self.sids_hb_rr5, sids_hb_r.r[:5])
  File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 979, in assert_array_almost_equal
    precision=decimal)
  File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 796, in assert_array_compare
    raise AssertionError(msg)
AssertionError:
Arrays are not almost equal to 6 decimals

(mismatch 80.0%)
 x: array([ 0.000756,  0.      ,  0.000829,  0.001832,  0.004989])
 y: array([ 0.000756,  0.000788,  0.000788,  0.001699,  0.004821])

======================================================================
FAIL: test_Headbanging_Median_Rate_tabular (pysal.esda.tests.test_smoothing.TestHB)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/1st/pysal-1.13.0/.pybuild/pythonX.Y_3.6/build/pysal/esda/tests/test_smoothing.py", line 315, in test_Headbanging_Median_Rate_tabular
    np.testing.assert_array_almost_equal(self.sids_hb_rr5, sids_hb_r.r[:5])
  File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 979, in assert_array_almost_equal
    precision=decimal)
  File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 796, in assert_array_compare
    raise AssertionError(msg)
AssertionError:
Arrays are not almost equal to 6 decimals

(mismatch 80.0%)
 x: array([ 0.000756,  0.      ,  0.000829,  0.001832,  0.004989])
 y: array([ 0.000756,  0.000788,  0.000788,  0.001699,  0.004821])

----------------------------------------------------------------------
Ran 369 tests in 94.655s

FAILED (SKIP=1, failures=2)
E: pybuild pybuild:283: test: plugin distutils failed with: exit code=1: cd /build/1st/pysal-1.13.0/.pybuild/pythonX.Y_3.6/build; python3.6 -m nose --exclude test_DistanceBand_arc  --exclude-dir=pysal/contrib --exclude-dir pysal/network
dh_auto_test: pybuild --test -i python{version} -p 3.6 3.5 returned exit code 13
debian/rules:18: recipe for target 'override_dh_auto_test' failed
make[1]: *** [override_dh_auto_test] Error 25

The Debian package already includes the fix for #896.

  • Platform information:
>>> import os; print(os.name, os.sys.platform);print(os.uname())
('posix', 'linux2')
('Linux', 'osiris', '4.9.0-3-amd64', '#1 SMP Debian 4.9.30-2 (2017-06-12)', 'x86_64')
  • Python versions
>>> import sys; print(sys.version)
2.7.13 (default, Jan 19 2017, 14:48:08) 
[GCC 6.3.0 20170118]
>>> import sys; print(sys.version)
3.5.3+ (default, Jun  7 2017, 23:23:48) 
[GCC 6.3.0 20170516]
>>> import sys; print(sys.version)
3.6.2rc1 (default, Jun 20 2017, 12:51:36) 
[GCC 6.3.0 20170516]
  • SciPy version:
>>> import scpiy; print(scipy.__version__)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named scpiy
>>> import scipy; print(scipy.__version__)
0.18.1
  • NumPy version:
>>> import numpy; print(numpy.__version__)
1.12.1
@ljwolf ljwolf added this to the Release milestone Jul 11, 2017
@sjsrey
Copy link
Member

sjsrey commented Jul 13, 2017

Closed with #953

@sjsrey sjsrey closed this as completed Jul 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants