[Scipy-tickets] [SciPy] #1787: Griddata incorrectly gives nan for values within convex hull

SciPy Trac scipy-tickets@scipy....
Tue Dec 11 16:21:32 CST 2012


#1787: Griddata incorrectly gives nan for values within convex hull
----------------------------------+-----------------------------------------
 Reporter:  freechus9             |       Owner:  pv          
     Type:  defect                |      Status:  needs_review
 Priority:  high                  |   Milestone:  Unscheduled 
Component:  scipy.interpolate     |     Version:  0.11.0      
 Keywords:  griddata, nan, qhull  |  
----------------------------------+-----------------------------------------
Changes (by freechus9):

  * status:  needs_info => needs_review


Comment:

 I tried scipy.interpolate.test("full",verbose=2) but the errors it gave
 were horrendus.  I will paste at the end.

 My new code:


 {{{
 import numpy
 import scipy
 from scipy.interpolate import griddata
 from scipy.spatial import Delaunay

 print scipy.__version__

 pts = numpy.array([[0.0,0.0],[0.0,1.0],[1.0,0.0],[1.0,1.0]])
 vals = numpy.array([1.0,2.0,3.0,4.0])
 evalpts = numpy.array([[0.1,0.1],[0.2,0.3]])

 print griddata(pts,vals,evalpts)

 tri = Delaunay(pts)

 print tri.vertices
 print tri.transform
 }}}



 {{{
 0.11.0
 [ nan  nan]
 []
 []
 }}}


 Also tried your test:


 {{{
 from scipy.interpolate import test

 test("full",verbose=2)
 }}}

 Output:


 {{{
 Running unit tests for scipy.interpolate
 NumPy version 1.6.2
 NumPy is installed in /home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy
 SciPy version 0.11.0
 SciPy is installed in /home/girdhar2/.local/lib64/python2.6/site-
 packages/scipy
 Python version 2.6.6 (r266:84292, May 20 2011, 16:42:11) [GCC 4.4.5
 20110214 (Red Hat 4.4.5-6)]
 nose version 1.1.2
 test_smoke_bisplrep_bisplev (test_fitpack.TestSmokeTests) ... ok
 test_smoke_splint_spalde (test_fitpack.TestSmokeTests) ... ok
 test_smoke_splprep_splrep_splev (test_fitpack.TestSmokeTests) ... ok
 test_smoke_splrep_splev (test_fitpack.TestSmokeTests) ... ok
 test_smoke_sproot (test_fitpack.TestSmokeTests) ... ok
 test_1d_shape (test_fitpack.TestSplev) ... ok
 test_bilinearity (test_fitpack2.TestLSQBivariateSpline) ... ok
 Test whether empty inputs returns an empty output. Ticket 1014 ... ok
 test_integral (test_fitpack2.TestLSQBivariateSpline) ... ok
 test_linear_constant (test_fitpack2.TestLSQBivariateSpline) ... ok
 test_empty_input (test_fitpack2.TestLSQSphereBivariateSpline) ... ok
 test_linear_constant (test_fitpack2.TestLSQSphereBivariateSpline) ... ok
 test_defaults (test_fitpack2.TestRectBivariateSpline) ... ok
 test_evaluate (test_fitpack2.TestRectBivariateSpline) ... ok
 test_defaults (test_fitpack2.TestRectSphereBivariateSpline) ... ok
 test_evaluate (test_fitpack2.TestRectSphereBivariateSpline) ... ok
 test_integral (test_fitpack2.TestSmoothBivariateSpline) ... ok
 test_linear_1d (test_fitpack2.TestSmoothBivariateSpline) ... ok
 test_linear_constant (test_fitpack2.TestSmoothBivariateSpline) ... ok
 test_empty_input (test_fitpack2.TestSmoothSphereBivariateSpline) ... ok
 test_linear_constant (test_fitpack2.TestSmoothSphereBivariateSpline) ...
 ok
 Test whether empty input returns an empty output. Ticket 1014 ... ok
 test_linear_1d (test_fitpack2.TestUnivariateSpline) ... ok
 test_linear_constant (test_fitpack2.TestUnivariateSpline) ... ok
 test_preserve_shape (test_fitpack2.TestUnivariateSpline) ... ok
 Regression test for #1375. ... ok
 test_subclassing (test_fitpack2.TestUnivariateSpline) ... ok
 test_interpnd.TestCloughTocher2DInterpolator.test_dense ... [ nan  nan
 nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan
   nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan
 nan
   nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan
 nan
   nan  nan  nan  nan  nan]
 [[[ nan  nan]]

  [[ nan  nan]]

  [[ nan  nan]]

  ...,
  [[ nan  nan]]

  [[ nan  nan]]

  [[ nan  nan]]]
 FAIL
 test_interpnd.TestCloughTocher2DInterpolator.test_linear_smoketest ... [
 nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan
   nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan
 nan
   nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan
 nan
   nan  nan  nan  nan  nan]
 [[[ nan  nan]]

  [[ nan  nan]]

  [[ nan  nan]]

  [[ nan  nan]]

  [[ nan  nan]]

  [[ nan  nan]]

  [[ nan  nan]]]
 FAIL
 test_interpnd.TestCloughTocher2DInterpolator.test_pickle ... ok
 test_interpnd.TestCloughTocher2DInterpolator.test_quadratic_smoketest ...
 [ nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan
 nan
   nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan
 nan
   nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan  nan
 nan
   nan  nan  nan  nan  nan]
 [[[ nan  nan]]

  [[ nan  nan]]

  [[ nan  nan]]

  [[ nan  nan]]

  [[ nan  nan]]

  [[ nan  nan]]

  [[ nan  nan]]]
 FAIL
 test_interpnd.TestCloughTocher2DInterpolator.test_wrong_ndim ... ok
 test_interpnd.TestEstimateGradients2DGlobal.test_smoketest ... ok
 test_interpnd.TestLinearNDInterpolation.test_complex_smoketest ... FAIL
 test_interpnd.TestLinearNDInterpolation.test_pickle ... ok
 test_interpnd.TestLinearNDInterpolation.test_smoketest ... FAIL
 test_interpnd.TestLinearNDInterpolation.test_smoketest_alternate ... FAIL
 test_interpnd.TestLinearNDInterpolation.test_square ... FAIL
 test_interpolate.TestInterp1D.test_bounds ... ok
 test_interpolate.TestInterp1D.test_complex ... ok
 Check the actual implementation of spline interpolation. ... ok
 Check that the attributes are initialized appropriately by the ... ok
 Check the actual implementation of linear interpolation. ... ok
 test_interpolate.TestInterp1D.test_nd ... ok
 test_interpolate.TestInterp1D.test_nd_zero_spline ... KNOWNFAIL: zero-
 order splines fail for the last point
 Check the actual implementation of nearest-neighbour interpolation. ... ok
 Make sure that appropriate exceptions are raised when invalid values ...
 ok
 Check the actual implementation of zero-order spline interpolation. ...
 KNOWNFAIL: zero-order splines fail for the last point
 test_interp2d (test_interpolate.TestInterp2D) ... ok
 test_interp2d_meshgrid_input (test_interpolate.TestInterp2D) ... ok
 test_lagrange (test_interpolate.TestLagrange) ... ok
 test_block_average_above (test_interpolate_wrapper.Test) ... ok
 test_linear (test_interpolate_wrapper.Test) ... ok
 test_linear2 (test_interpolate_wrapper.Test) ... ok
 test_logarithmic (test_interpolate_wrapper.Test) ... ok
 test_nearest (test_interpolate_wrapper.Test) ... ok
 test_ndgriddata.TestGriddata.test_1d ... ok
 test_ndgriddata.TestGriddata.test_1d_unsorted ... ok
 test_ndgriddata.TestGriddata.test_alternative_call ... FAIL
 test_ndgriddata.TestGriddata.test_complex_2d ... FAIL
 test_ndgriddata.TestGriddata.test_fill_value ... FAIL
 test_ndgriddata.TestGriddata.test_multipoint_2d ... FAIL
 test_ndgriddata.TestGriddata.test_multivalue_2d ... FAIL
 test_append (test_polyint.CheckBarycentric) ... ok
 test_delayed (test_polyint.CheckBarycentric) ... ok
 test_lagrange (test_polyint.CheckBarycentric) ... ok
 test_scalar (test_polyint.CheckBarycentric) ... ok
 test_shapes_1d_vectorvalue (test_polyint.CheckBarycentric) ... ok
 test_shapes_scalarvalue (test_polyint.CheckBarycentric) ... ok
 test_shapes_vectorvalue (test_polyint.CheckBarycentric) ... ok
 test_vector (test_polyint.CheckBarycentric) ... ok
 test_wrapper (test_polyint.CheckBarycentric) ... ok
 test_derivative (test_polyint.CheckKrogh) ... ok
 test_derivatives (test_polyint.CheckKrogh) ... ok
 test_empty (test_polyint.CheckKrogh) ... ok
 test_hermite (test_polyint.CheckKrogh) ... ok
 test_high_derivative (test_polyint.CheckKrogh) ... ok
 test_lagrange (test_polyint.CheckKrogh) ... ok
 test_low_derivatives (test_polyint.CheckKrogh) ... ok
 test_scalar (test_polyint.CheckKrogh) ... ok
 test_shapes_1d_vectorvalue (test_polyint.CheckKrogh) ... ok
 test_shapes_scalarvalue (test_polyint.CheckKrogh) ... ok
 test_shapes_scalarvalue_derivative (test_polyint.CheckKrogh) ... ok
 test_shapes_vectorvalue (test_polyint.CheckKrogh) ... ok
 test_shapes_vectorvalue_derivative (test_polyint.CheckKrogh) ... ok
 test_vector (test_polyint.CheckKrogh) ... ok
 test_wrapper (test_polyint.CheckKrogh) ... ok
 test_construction (test_polyint.CheckPiecewise) ... ok
 test_derivative (test_polyint.CheckPiecewise) ... ok
 test_derivatives (test_polyint.CheckPiecewise) ... ok
 test_incremental (test_polyint.CheckPiecewise) ... ok
 test_scalar (test_polyint.CheckPiecewise) ... ok
 test_shapes_scalarvalue (test_polyint.CheckPiecewise) ... ok
 test_shapes_scalarvalue_derivative (test_polyint.CheckPiecewise) ... ok
 test_shapes_vectorvalue (test_polyint.CheckPiecewise) ... ok
 test_shapes_vectorvalue_1d (test_polyint.CheckPiecewise) ... ok
 test_shapes_vectorvalue_derivative (test_polyint.CheckPiecewise) ... ok
 test_vector (test_polyint.CheckPiecewise) ... ok
 test_wrapper (test_polyint.CheckPiecewise) ... ok
 test_exponential (test_polyint.CheckTaylor) ... ok
 test_rbf.test_rbf_interpolation('multiquadric',) ... ok
 test_rbf.test_rbf_interpolation('multiquadric',) ... ok
 test_rbf.test_rbf_interpolation('multiquadric',) ... ok
 test_rbf.test_rbf_interpolation('inverse multiquadric',) ... ok
 test_rbf.test_rbf_interpolation('inverse multiquadric',) ... ok
 test_rbf.test_rbf_interpolation('inverse multiquadric',) ... ok
 test_rbf.test_rbf_interpolation('gaussian',) ... ok
 test_rbf.test_rbf_interpolation('gaussian',) ... ok
 test_rbf.test_rbf_interpolation('gaussian',) ... ok
 test_rbf.test_rbf_interpolation('cubic',) ... ok
 test_rbf.test_rbf_interpolation('cubic',) ... ok
 test_rbf.test_rbf_interpolation('cubic',) ... ok
 test_rbf.test_rbf_interpolation('quintic',) ... ok
 test_rbf.test_rbf_interpolation('quintic',) ... ok
 test_rbf.test_rbf_interpolation('quintic',) ... ok
 test_rbf.test_rbf_interpolation('thin-plate',) ... ok
 test_rbf.test_rbf_interpolation('thin-plate',) ... ok
 test_rbf.test_rbf_interpolation('thin-plate',) ... ok
 test_rbf.test_rbf_interpolation('linear',) ... ok
 test_rbf.test_rbf_interpolation('linear',) ... ok
 test_rbf.test_rbf_interpolation('linear',) ... ok
 test_rbf.test_rbf_regularity('multiquadric', 0.050000000000000003) ... ok
 test_rbf.test_rbf_regularity('inverse multiquadric', 0.02) ... ok
 test_rbf.test_rbf_regularity('gaussian', 0.01) ... ok
 test_rbf.test_rbf_regularity('cubic', 0.14999999999999999) ... ok
 test_rbf.test_rbf_regularity('quintic', 0.10000000000000001) ... ok
 test_rbf.test_rbf_regularity('thin-plate', 0.10000000000000001) ... ok
 test_rbf.test_rbf_regularity('linear', 0.20000000000000001) ... ok
 Check that the Rbf class can be constructed with the default ... ok
 Check that the Rbf class can be constructed with function=callable. ... ok
 Check that the Rbf class can be constructed with a two argument ... ok
 Ticket #629 ... ok

 ======================================================================
 FAIL: test_interpnd.TestCloughTocher2DInterpolator.test_dense
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/home/girdhar2/.local/lib/python2.6/site-packages/nose/case.py",
 line 197, in runTest
     self.test(*self.arg)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/scipy/interpolate/tests/test_interpnd.py", line 196, in
 test_dense
     err_msg="Function %d" % j)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/scipy/interpolate/tests/test_interpnd.py", line 145, in
 _check_accuracy
     assert_allclose(a, b, **kw)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 1168, in assert_allclose
     verbose=verbose, header=header)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 605, in assert_array_compare
     chk_same_position(x_id, y_id, hasval='nan')
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 588, in chk_same_position
     raise AssertionError(msg)
 AssertionError:
 Not equal to tolerance rtol=0.01, atol=0.005
 Function 0
 x and y nan location mismatch:
  x: array([ nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,
 nan,
         nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,
         nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,
 nan,...
  y: array([  3.66796999e-02,   1.91605573e-01,   6.08362261e-01,
          7.64324844e-02,   9.18031021e-01,   1.28033199e-01,
          4.67121584e-01,   1.37085621e-01,   2.53092671e-01,...

 ======================================================================
 FAIL: test_interpnd.TestCloughTocher2DInterpolator.test_linear_smoketest
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/home/girdhar2/.local/lib/python2.6/site-packages/nose/case.py",
 line 197, in runTest
     self.test(*self.arg)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/scipy/interpolate/tests/test_interpnd.py", line 162, in
 test_linear_smoketest
     err_msg="Function %d" % j)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/scipy/interpolate/tests/test_interpnd.py", line 145, in
 _check_accuracy
     assert_allclose(a, b, **kw)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 1168, in assert_allclose
     verbose=verbose, header=header)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 605, in assert_array_compare
     chk_same_position(x_id, y_id, hasval='nan')
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 588, in chk_same_position
     raise AssertionError(msg)
 AssertionError:
 Not equal to tolerance rtol=1e-07, atol=1e-07
 Function 0
 x and y nan location mismatch:
  x: array([ nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,
 nan,
         nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,
         nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,
 nan,...
  y: array([ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
 1.,
         1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
         1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
         1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.])

 ======================================================================
 FAIL:
 test_interpnd.TestCloughTocher2DInterpolator.test_quadratic_smoketest
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/home/girdhar2/.local/lib/python2.6/site-packages/nose/case.py",
 line 197, in runTest
     self.test(*self.arg)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/scipy/interpolate/tests/test_interpnd.py", line 178, in
 test_quadratic_smoketest
     err_msg="Function %d" % j)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/scipy/interpolate/tests/test_interpnd.py", line 145, in
 _check_accuracy
     assert_allclose(a, b, **kw)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 1168, in assert_allclose
     verbose=verbose, header=header)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 605, in assert_array_compare
     chk_same_position(x_id, y_id, hasval='nan')
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 588, in chk_same_position
     raise AssertionError(msg)
 AssertionError:
 Not equal to tolerance rtol=0, atol=0.22
 Function 0
 x and y nan location mismatch:
  x: array([ nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,
 nan,
         nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,
         nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,
 nan,...
  y: array([  3.66796999e-02,   1.91605573e-01,   6.08362261e-01,
          7.64324844e-02,   9.18031021e-01,   1.28033199e-01,
          4.67121584e-01,   1.37085621e-01,   2.53092671e-01,...

 ======================================================================
 FAIL: test_interpnd.TestLinearNDInterpolation.test_complex_smoketest
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/home/girdhar2/.local/lib/python2.6/site-packages/nose/case.py",
 line 197, in runTest
     self.test(*self.arg)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/scipy/interpolate/tests/test_interpnd.py", line 37, in
 test_complex_smoketest
     assert_almost_equal(y, yi)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 448, in assert_almost_equal
     raise AssertionError(msg)
 AssertionError:
 Arrays are not almost equal to 7 decimals
  ACTUAL: array([ 0. +0.j,  1. -3.j,  2. -6.j,  3. -9.j,  4.-12.j])
  DESIRED: array([ nan+0.j,  nan+0.j,  nan+0.j,  nan+0.j,  nan+0.j])

 ======================================================================
 FAIL: test_interpnd.TestLinearNDInterpolation.test_smoketest
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/home/girdhar2/.local/lib/python2.6/site-packages/nose/case.py",
 line 197, in runTest
     self.test(*self.arg)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/scipy/interpolate/tests/test_interpnd.py", line 18, in
 test_smoketest
     assert_almost_equal(y, yi)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 452, in assert_almost_equal
     return assert_array_almost_equal(actual, desired, decimal, err_msg)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 800, in assert_array_almost_equal
     header=('Arrays are not almost equal to %d decimals' % decimal))
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 605, in assert_array_compare
     chk_same_position(x_id, y_id, hasval='nan')
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 588, in chk_same_position
     raise AssertionError(msg)
 AssertionError:
 Arrays are not almost equal to 7 decimals

 x and y nan location mismatch:
  x: array([ 0.,  1.,  2.,  3.,  4.])
  y: array([ nan,  nan,  nan,  nan,  nan])

 ======================================================================
 FAIL: test_interpnd.TestLinearNDInterpolation.test_smoketest_alternate
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/home/girdhar2/.local/lib/python2.6/site-packages/nose/case.py",
 line 197, in runTest
     self.test(*self.arg)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/scipy/interpolate/tests/test_interpnd.py", line 27, in
 test_smoketest_alternate
     assert_almost_equal(y, yi)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 452, in assert_almost_equal
     return assert_array_almost_equal(actual, desired, decimal, err_msg)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 800, in assert_array_almost_equal
     header=('Arrays are not almost equal to %d decimals' % decimal))
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 605, in assert_array_compare
     chk_same_position(x_id, y_id, hasval='nan')
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 588, in chk_same_position
     raise AssertionError(msg)
 AssertionError:
 Arrays are not almost equal to 7 decimals

 x and y nan location mismatch:
  x: array([ 0.,  1.,  2.,  3.,  4.])
  y: array([ nan,  nan,  nan,  nan,  nan])

 ======================================================================
 FAIL: test_interpnd.TestLinearNDInterpolation.test_square
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/home/girdhar2/.local/lib/python2.6/site-packages/nose/case.py",
 line 197, in runTest
     self.test(*self.arg)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/scipy/interpolate/tests/test_interpnd.py", line 82, in
 test_square
     assert_almost_equal(zi, ip(xx, yy))
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 452, in assert_almost_equal
     return assert_array_almost_equal(actual, desired, decimal, err_msg)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 800, in assert_array_almost_equal
     header=('Arrays are not almost equal to %d decimals' % decimal))
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 605, in assert_array_compare
     chk_same_position(x_id, y_id, hasval='nan')
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 588, in chk_same_position
     raise AssertionError(msg)
 AssertionError:
 Arrays are not almost equal to 7 decimals

 x and y nan location mismatch:
  x: array([ nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,
 nan,
         nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,
         nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,
 nan,...
  y: array([  1.00000000e+00,   1.07692308e+00,   1.15384615e+00,
          1.23076923e+00,   1.30769231e+00,   1.38461538e+00,
          1.46153846e+00,   1.53846154e+00,   1.61538462e+00,...

 ======================================================================
 FAIL: test_ndgriddata.TestGriddata.test_alternative_call
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/home/girdhar2/.local/lib/python2.6/site-packages/nose/case.py",
 line 197, in runTest
     self.test(*self.arg)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/scipy/interpolate/tests/test_ndgriddata.py", line 27, in
 test_alternative_call
     assert_allclose(y, yi, atol=1e-14, err_msg=method)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 1168, in assert_allclose
     verbose=verbose, header=header)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 605, in assert_array_compare
     chk_same_position(x_id, y_id, hasval='nan')
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 588, in chk_same_position
     raise AssertionError(msg)
 AssertionError:
 Not equal to tolerance rtol=1e-07, atol=1e-14
 linear
 x and y nan location mismatch:
  x: array([[ 0.,  1.],
        [ 1.,  2.],
        [ 2.,  3.],...
  y: array([[ nan,  nan],
        [ nan,  nan],
        [ nan,  nan],...

 ======================================================================
 FAIL: test_ndgriddata.TestGriddata.test_complex_2d
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/home/girdhar2/.local/lib/python2.6/site-packages/nose/case.py",
 line 197, in runTest
     self.test(*self.arg)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/scipy/interpolate/tests/test_ndgriddata.py", line 66, in
 test_complex_2d
     atol=1e-14, err_msg=method)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 1168, in assert_allclose
     verbose=verbose, header=header)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 605, in assert_array_compare
     chk_same_position(x_id, y_id, hasval='nan')
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 588, in chk_same_position
     raise AssertionError(msg)
 AssertionError:
 Not equal to tolerance rtol=1e-07, atol=1e-14
 linear
 x and y nan location mismatch:
  x: array([[ nan+0.j,  nan+0.j,  nan+0.j],
        [ nan+0.j,  nan+0.j,  nan+0.j],
        [ nan+0.j,  nan+0.j,  nan+0.j],...
  y: array([[ 0.-8.j,  0.-8.j,  0.-8.j],
        [ 1.-6.j,  1.-6.j,  1.-6.j],
        [ 2.-4.j,  2.-4.j,  2.-4.j],...

 ======================================================================
 FAIL: test_ndgriddata.TestGriddata.test_fill_value
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/home/girdhar2/.local/lib/python2.6/site-packages/nose/case.py",
 line 197, in runTest
     self.test(*self.arg)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/scipy/interpolate/tests/test_ndgriddata.py", line 14, in
 test_fill_value
     assert_array_equal(yi, [-1., -1, 1])
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 707, in assert_array_equal
     verbose=verbose, header='Arrays are not equal')
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 636, in assert_array_compare
     raise AssertionError(msg)
 AssertionError:
 Arrays are not equal

 (mismatch 33.3333333333%)
  x: array([-1., -1., -1.])
  y: array([-1., -1.,  1.])

 ======================================================================
 FAIL: test_ndgriddata.TestGriddata.test_multipoint_2d
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/home/girdhar2/.local/lib/python2.6/site-packages/nose/case.py",
 line 197, in runTest
     self.test(*self.arg)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/scipy/interpolate/tests/test_ndgriddata.py", line 51, in
 test_multipoint_2d
     atol=1e-14, err_msg=method)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 1168, in assert_allclose
     verbose=verbose, header=header)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 605, in assert_array_compare
     chk_same_position(x_id, y_id, hasval='nan')
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 588, in chk_same_position
     raise AssertionError(msg)
 AssertionError:
 Not equal to tolerance rtol=1e-07, atol=1e-14
 linear
 x and y nan location mismatch:
  x: array([[ nan,  nan,  nan],
        [ nan,  nan,  nan],
        [ nan,  nan,  nan],...
  y: array([[ 0.,  0.,  0.],
        [ 1.,  1.,  1.],
        [ 2.,  2.,  2.],...

 ======================================================================
 FAIL: test_ndgriddata.TestGriddata.test_multivalue_2d
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/home/girdhar2/.local/lib/python2.6/site-packages/nose/case.py",
 line 197, in runTest
     self.test(*self.arg)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/scipy/interpolate/tests/test_ndgriddata.py", line 37, in
 test_multivalue_2d
     assert_allclose(y, yi, atol=1e-14, err_msg=method)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 1168, in assert_allclose
     verbose=verbose, header=header)
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 605, in assert_array_compare
     chk_same_position(x_id, y_id, hasval='nan')
   File "/home/girdhar2/.local/lib64/python2.6/site-
 packages/numpy/testing/utils.py", line 588, in chk_same_position
     raise AssertionError(msg)
 AssertionError:
 Not equal to tolerance rtol=1e-07, atol=1e-14
 linear
 x and y nan location mismatch:
  x: array([[ 0.,  1.],
        [ 1.,  2.],
        [ 2.,  3.],...
  y: array([[ nan,  nan],
        [ nan,  nan],
        [ nan,  nan],...

 ----------------------------------------------------------------------
 Ran 132 tests in 8.478s

 FAILED (KNOWNFAIL=2, failures=12)

 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1787#comment:5>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list