From 9b6636ded65768e61f37f9050d225e4a61971ca5 Mon Sep 17 00:00:00 2001 From: lbdreyer Date: Tue, 14 Mar 2017 14:15:32 +0000 Subject: [PATCH] Keep fill value of cube when resetting the cube's data --- lib/iris/tests/test_interpolation.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/iris/tests/test_interpolation.py b/lib/iris/tests/test_interpolation.py index f3648e3297..bf537477bc 100644 --- a/lib/iris/tests/test_interpolation.py +++ b/lib/iris/tests/test_interpolation.py @@ -1,4 +1,4 @@ -# (C) British Crown Copyright 2010 - 2016, Met Office +# (C) British Crown Copyright 2010 - 2017, Met Office # # This file is part of Iris. # @@ -26,7 +26,6 @@ import iris.tests as tests import numpy as np -import numpy.ma as ma from scipy.interpolate import interp1d import iris @@ -43,7 +42,9 @@ def normalise_order(cube): # function when the circular flag is true. # * scipy.interpolate.interp1d in 0.11.0 which is used in # `Linear1dExtrapolator`. + cube_fill_val = cube.fill_value cube.data = np.ascontiguousarray(cube.data) + cube.fill_value = cube_fill_val class TestLinearExtrapolator(tests.IrisTest):