diff --git a/pandas/core/common.py b/pandas/core/common.py index 8a44723a83c4e..92d60ae8d8847 100644 --- a/pandas/core/common.py +++ b/pandas/core/common.py @@ -1538,6 +1538,14 @@ def _interpolate_scipy_wrapper(x, y, new_x, method, fill_value=None, terp = interpolate.UnivariateSpline(x, y, k=order) new_y = terp(new_x) else: + # GH 7295: need to be able to write for some reason + # in some circumstances: check all three + if not x.flags.writeable: + x = x.copy() + if not y.flags.writeable: + y = y.copy() + if not new_x.flags.writeable: + new_x = new_x.copy() method = alt_methods[method] new_y = method(x, y, new_x) return new_y