[NumPy-Tickets] [NumPy] #1768: test_random.TestRandomDist - tests too aggressive?

NumPy Trac numpy-tickets@scipy....
Fri Mar 11 09:51:33 CST 2011


#1768: test_random.TestRandomDist - tests too aggressive?
--------------------------+-------------------------------------------------
 Reporter:  sienkiew      |       Owner:  somebody   
     Type:  defect        |      Status:  new        
 Priority:  normal        |   Milestone:  Unscheduled
Component:  numpy.random  |     Version:  1.5.1      
 Keywords:                |  
--------------------------+-------------------------------------------------
 These tests are failing on 32 bit Red Hat Enterprise 4 linux.  They are
 passing on 64 bit RHE4, 64 bit RHE 5, and 32 bit Mac Leopard.

 I have not looked at every single number in this result, but of those that
 I have, the printed representation of the number is identical.  I suspect
 the problem may be that 15 decimal places is too high a standard.
 assert_array_almost_equal does not actually print all the digits it is
 comparing, so there is no way to know how far off the actual values are.


 {{{
 ======================================================================
 FAIL: test_chisquare (test_random.TestRandomDist)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/stsci/pyssgdev/2.7/numpy/random/tests/test_random.py", line
 154, in test_chisquare
     np.testing.assert_array_almost_equal(actual, desired, decimal=15)
   File "/usr/stsci/pyssgdev/2.7/numpy/testing/utils.py", line 791, in
 assert_array_almost_equal
     header=('Arrays are not almost equal to %d decimals' % decimal))
   File "/usr/stsci/pyssgdev/2.7/numpy/testing/utils.py", line 627, in
 assert_array_compare
     raise AssertionError(msg)
 AssertionError:
 Arrays are not almost equal to 15 decimals

 (mismatch 50.0%)
  x: array([[ 63.87858176,  68.68407749],
        [ 65.77116117,  47.09686762],
        [ 72.38284032,  74.18408615]])
  y: array([[ 63.87858176,  68.68407749],
        [ 65.77116117,  47.09686762],
        [ 72.38284032,  74.18408615]])

 ======================================================================
 FAIL: test_gamma (test_random.TestRandomDist)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/stsci/pyssgdev/2.7/numpy/random/tests/test_random.py", line
 190, in test_gamma
     np.testing.assert_array_almost_equal(actual, desired, decimal=15)
   File "/usr/stsci/pyssgdev/2.7/numpy/testing/utils.py", line 791, in
 assert_array_almost_equal
     header=('Arrays are not almost equal to %d decimals' % decimal))
   File "/usr/stsci/pyssgdev/2.7/numpy/testing/utils.py", line 627, in
 assert_array_compare
     raise AssertionError(msg)
 AssertionError:
 Arrays are not almost equal to 15 decimals

 (mismatch 16.6666666667%)
  x: array([[ 24.60509189,  28.54993563],
        [ 26.1347611 ,  12.56988483],
        [ 31.71863276,  33.30143303]])
  y: array([[ 24.60509189,  28.54993563],
        [ 26.1347611 ,  12.56988483],
        [ 31.71863276,  33.30143303]])

 ======================================================================
 FAIL: test_lognormal (test_random.TestRandomDist)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/stsci/pyssgdev/2.7/numpy/random/tests/test_random.py", line
 238, in test_lognormal
     np.testing.assert_array_almost_equal(actual, desired, decimal=15)
   File "/usr/stsci/pyssgdev/2.7/numpy/testing/utils.py", line 791, in
 assert_array_almost_equal
     header=('Arrays are not almost equal to %d decimals' % decimal))
   File "/usr/stsci/pyssgdev/2.7/numpy/testing/utils.py", line 627, in
 assert_array_compare
     raise AssertionError(msg)
 AssertionError:
 Arrays are not almost equal to 15 decimals

 (mismatch 66.6666666667%)
  x: array([[ 16.50698632,  36.54846706],
        [ 22.678866  ,   0.71617561],
        [ 65.72798502,  86.84341601]])
  y: array([[ 16.50698632,  36.54846706],
        [ 22.678866  ,   0.71617561],
        [ 65.72798502,  86.84341601]])

 ======================================================================
 FAIL: test_noncentral_chisquare (test_random.TestRandomDist)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/stsci/pyssgdev/2.7/numpy/random/tests/test_random.py", line
 287, in test_noncentral_chisquare
     np.testing.assert_array_almost_equal(actual, desired, decimal=15)
   File "/usr/stsci/pyssgdev/2.7/numpy/testing/utils.py", line 791, in
 assert_array_almost_equal
     header=('Arrays are not almost equal to %d decimals' % decimal))
   File "/usr/stsci/pyssgdev/2.7/numpy/testing/utils.py", line 627, in
 assert_array_compare
     raise AssertionError(msg)
 AssertionError:
 Arrays are not almost equal to 15 decimals

 (mismatch 16.6666666667%)
  x: array([[ 23.91905354,  13.35324693],
        [ 31.22452661,  16.60047399],
        [  5.03461598,  17.94973089]])
  y: array([[ 23.91905354,  13.35324693],
        [ 31.22452661,  16.60047399],
        [  5.03461598,  17.94973089]])

 ======================================================================
 FAIL: test_noncentral_f (test_random.TestRandomDist)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/stsci/pyssgdev/2.7/numpy/random/tests/test_random.py", line
 296, in test_noncentral_f
     np.testing.assert_array_almost_equal(actual, desired, decimal=15)
   File "/usr/stsci/pyssgdev/2.7/numpy/testing/utils.py", line 791, in
 assert_array_almost_equal
     header=('Arrays are not almost equal to %d decimals' % decimal))
   File "/usr/stsci/pyssgdev/2.7/numpy/testing/utils.py", line 627, in
 assert_array_compare
     raise AssertionError(msg)
 AssertionError:
 Arrays are not almost equal to 15 decimals

 (mismatch 16.6666666667%)
  x: array([[ 1.405981  ,  0.34207973],
        [ 3.57715069,  7.92632663],
        [ 0.43741599,  1.17742088]])
  y: array([[ 1.405981  ,  0.34207973],
        [ 3.57715069,  7.92632663],
        [ 0.43741599,  1.17742088]])

 ======================================================================
 FAIL: test_rayleigh (test_random.TestRandomDist)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/stsci/pyssgdev/2.7/numpy/random/tests/test_random.py", line
 344, in test_rayleigh
     np.testing.assert_array_almost_equal(actual, desired, decimal=15)
   File "/usr/stsci/pyssgdev/2.7/numpy/testing/utils.py", line 791, in
 assert_array_almost_equal
     header=('Arrays are not almost equal to %d decimals' % decimal))
   File "/usr/stsci/pyssgdev/2.7/numpy/testing/utils.py", line 627, in
 assert_array_compare
     raise AssertionError(msg)
 AssertionError:
 Arrays are not almost equal to 15 decimals

 (mismatch 16.6666666667%)
  x: array([[ 13.88824965,  13.38331834],
        [ 20.95413364,  21.08285016],
        [ 11.06066537,  17.35468506]])
  y: array([[ 13.88824965,  13.38331834],
        [ 20.95413364,  21.08285016],
        [ 11.06066537,  17.35468506]])

 ======================================================================
 FAIL: test_standard_gamma (test_random.TestRandomDist)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/stsci/pyssgdev/2.7/numpy/random/tests/test_random.py", line
 368, in test_standard_gamma
     np.testing.assert_array_almost_equal(actual, desired, decimal=15)
   File "/usr/stsci/pyssgdev/2.7/numpy/testing/utils.py", line 791, in
 assert_array_almost_equal
     header=('Arrays are not almost equal to %d decimals' % decimal))
   File "/usr/stsci/pyssgdev/2.7/numpy/testing/utils.py", line 627, in
 assert_array_compare
     raise AssertionError(msg)
 AssertionError:
 Arrays are not almost equal to 15 decimals

 (mismatch 66.6666666667%)
  x: array([[ 5.50841531,  6.6295347 ],
        [ 5.93988485,  2.31044849],
        [ 7.54838614,  8.01275609]])
  y: array([[ 5.50841531,  6.6295347 ],
        [ 5.93988485,  2.31044849],
        [ 7.54838614,  8.01275609]])

 ======================================================================
 FAIL: test_triangular (test_random.TestRandomDist)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/stsci/pyssgdev/2.7/numpy/random/tests/test_random.py", line
 393, in test_triangular
     np.testing.assert_array_almost_equal(actual, desired, decimal=15)
   File "/usr/stsci/pyssgdev/2.7/numpy/testing/utils.py", line 791, in
 assert_array_almost_equal
     header=('Arrays are not almost equal to %d decimals' % decimal))
   File "/usr/stsci/pyssgdev/2.7/numpy/testing/utils.py", line 627, in
 assert_array_compare
     raise AssertionError(msg)
 AssertionError:
 Arrays are not almost equal to 15 decimals

 (mismatch 33.3333333333%)
  x: array([[ 12.68117179,  12.41292061],
        [ 16.20131377,  16.25692139],
        [ 11.20400691,  14.49781448]])
  y: array([[ 12.68117179,  12.41292061],
        [ 16.20131377,  16.25692139],
        [ 11.20400691,  14.49781448]])

 ======================================================================
 FAIL: test_wald (test_random.TestRandomDist)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/stsci/pyssgdev/2.7/numpy/random/tests/test_random.py", line
 418, in test_wald
     np.testing.assert_array_almost_equal(actual, desired, decimal=15)
   File "/usr/stsci/pyssgdev/2.7/numpy/testing/utils.py", line 791, in
 assert_array_almost_equal
     header=('Arrays are not almost equal to %d decimals' % decimal))
   File "/usr/stsci/pyssgdev/2.7/numpy/testing/utils.py", line 627, in
 assert_array_compare
     raise AssertionError(msg)
 AssertionError:
 Arrays are not almost equal to 15 decimals

 (mismatch 16.6666666667%)
  x: array([[ 3.82935266,  5.13125249],
        [ 0.35045404,  1.50832397],
        [ 0.2412432 ,  0.22031101]])
  y: array([[ 3.82935266,  5.13125249],
        [ 0.35045404,  1.50832397],
        [ 0.2412432 ,  0.22031101]])

 ----------------------------------------------------------------------
 }}}

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1768>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list