Skip to content

BUG: test_interp_regression failure #7295

Closed
@dsm054

Description

@dsm054
test_interp_regression (__main__.TestSeries) ... > /home/dsm/sys/pandas/pandas/tests/stringsource(327)View.MemoryView.memoryview.__cinit__ (scipy/interpolate/_ppoly.c:19922)()
(Pdb) cont
ERROR

======================================================================
ERROR: test_interp_regression (__main__.TestSeries)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_generic.py", line 501, in test_interp_regression
    interp_s = ser.reindex(new_index).interpolate(method='pchip')
  File "/usr/local/lib/python2.7/dist-packages/pandas-0.14.0_12_g150cb3b-py2.7-linux-i686.egg/pandas/core/generic.py", line 2582, in interpolate
    **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pandas-0.14.0_12_g150cb3b-py2.7-linux-i686.egg/pandas/core/internals.py", line 2197, in interpolate
    return self.apply('interpolate', **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pandas-0.14.0_12_g150cb3b-py2.7-linux-i686.egg/pandas/core/internals.py", line 2164, in apply
    applied = getattr(b, f)(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pandas-0.14.0_12_g150cb3b-py2.7-linux-i686.egg/pandas/core/internals.py", line 667, in interpolate
    **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pandas-0.14.0_12_g150cb3b-py2.7-linux-i686.egg/pandas/core/internals.py", line 733, in _interpolate
    interp_values = np.apply_along_axis(func, axis, data)
  File "/usr/local/lib/python2.7/dist-packages/numpy/lib/shape_base.py", line 81, in apply_along_axis
    res = func1d(arr[tuple(i.tolist())],*args)
  File "/usr/local/lib/python2.7/dist-packages/pandas-0.14.0_12_g150cb3b-py2.7-linux-i686.egg/pandas/core/internals.py", line 730, in func
    bounds_error=False, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pandas-0.14.0_12_g150cb3b-py2.7-linux-i686.egg/pandas/core/common.py", line 1489, in interpolate_1d
    bounds_error=bounds_error, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pandas-0.14.0_12_g150cb3b-py2.7-linux-i686.egg/pandas/core/common.py", line 1541, in _interpolate_scipy_wrapper
    new_y = method(x, y, new_x)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/_monotone.py", line 221, in pchip_interpolate
    return P(x)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/_monotone.py", line 98, in __call__
    out = self._bpoly(x, der, extrapolate)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py", line 689, in __call__
    self._evaluate(x, nu, extrapolate, out)
  File "/usr/local/lib/python2.7/dist-packages/scipy/interpolate/interpolate.py", line 1087, in _evaluate
    self.x, x, nu, bool(extrapolate), out, self.c.dtype)
  File "_ppoly.pyx", line 846, in scipy.interpolate._ppoly.evaluate_bernstein (scipy/interpolate/_ppoly.c:15014)
  File "stringsource", line 622, in View.MemoryView.memoryview_cwrapper (scipy/interpolate/_ppoly.c:23370)
  File "stringsource", line 327, in View.MemoryView.memoryview.__cinit__ (scipy/interpolate/_ppoly.c:19922)
ValueError: buffer source array is read-only

----------------------------------------------------------------------
Ran 63 tests in 3.981s

FAILED (SKIP=1, errors=1)

Version info:

>>> pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.5.final.0
python-bits: 32
OS: Linux
OS-release: 3.11.0-20-generic
machine: i686
processor: i686
byteorder: little
LC_ALL: None
LANG: en_CA.UTF-8

pandas: 0.14.0-12-g150cb3b
nose: 1.3.1
Cython: 0.20.1
numpy: 1.9.0.dev-ef7901d
scipy: 0.15.0.dev-93656a8
statsmodels: 0.6.0.dev-985037f
IPython: 2.0.0-dev
sphinx: 1.2.2
patsy: 0.2.1
scikits.timeseries: None
dateutil: 2.2
pytz: 2014.1
bottleneck: 0.8.0
tables: None
numexpr: 2.3.1
matplotlib: 1.4.x
openpyxl: 2.0.2
xlrd: 0.9.3
xlwt: 0.7.5
xlsxwriter: 0.5.5
lxml: 3.3.3
bs4: 4.3.2
html5lib: 1.0b3
bq: None
apiclient: 1.2
rpy2: None
sqlalchemy: 0.9.3
pymysql: None
psycopg2: None

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateTestingpandas testing functions or related to the test suite

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions