Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace intersection #2409

Merged
merged 4 commits into from
Feb 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions lib/iris/cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -2462,13 +2462,12 @@ def make_chunk(key):
result = chunks[0]
else:
if self.has_lazy_data():
data = biggus.LinearMosaic([chunk.lazy_data()
for chunk in chunks],
dim)
module = da
chunk_data = [chunk.lazy_data()for chunk in chunks]
else:
chunk_data = [chunk.data for chunk in chunks]
module = ma if ma.isMaskedArray(self.data) else np
data = module.concatenate([chunk.data for chunk in chunks],
dim)
data = module.concatenate(chunk_data, dim)
result = iris.cube.Cube(data)
result.metadata = copy.deepcopy(self.metadata)

Expand Down
5 changes: 0 additions & 5 deletions lib/iris/tests/unit/cube/test_Cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,6 @@ def create_cube(lon_min, lon_max, bounds=False):


# Ensure all the other coordinates and factories are correctly preserved.
@tests.skip_biggus
class Test_intersection__Metadata(tests.IrisTest):
def test_metadata(self):
cube = create_cube(0, 360)
Expand All @@ -585,7 +584,6 @@ def test_metadata_wrapped(self):


# Explicitly check the handling of `circular` on the result.
@tests.skip_biggus
class Test_intersection__Circular(tests.IrisTest):
def test_regional(self):
cube = create_cube(0, 360)
Expand Down Expand Up @@ -642,7 +640,6 @@ def test_null_region(self):
cube.intersection(longitude=(10, 10, False, False))


@tests.skip_biggus
class Test_intersection__Lazy(tests.IrisTest):
def test_real_data(self):
cube = create_cube(0, 360)
Expand Down Expand Up @@ -771,7 +768,6 @@ def test_tolerance_f8(self):

# Check what happens with a global, points-only circular intersection
# coordinate.
@tests.skip_biggus
class Test_intersection__GlobalSrcModulus(tests.IrisTest):
def test_global_wrapped_extreme_increasing_base_period(self):
# Ensure that we can correctly handle points defined at (base + period)
Expand Down Expand Up @@ -957,7 +953,6 @@ def test_tolerance_bug_wrapped(self):

# Check what happens with a global, points-and-bounds circular
# intersection coordinate.
@tests.skip_biggus
class Test_intersection__ModulusBounds(tests.IrisTest):
def test_global_wrapped_extreme_increasing_base_period(self):
# Ensure that we can correctly handle bounds defined at (base + period)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ def test(self):
self.assertIs(message.sections, mock.sentinel.SECTIONS)


@tests.skip_biggus
class Test_data__masked(tests.IrisTest):
def setUp(self):
self.bitmap = np.array([0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1])
Expand Down Expand Up @@ -128,7 +127,6 @@ def test_bitmap__invalid_indicator(self):
message.data.ndarray()


@tests.skip_biggus
class Test_data__unsupported(tests.IrisTest):
def test_unsupported_grid_definition(self):
message = _make_test_message({3: {'sourceOfGridDefinition': 1},
Expand Down Expand Up @@ -283,7 +281,6 @@ def section_3(self, scanning_mode):
return section_3


@tests.skip_biggus
class Test_data__unknown_grid_template(tests.IrisTest):
def test(self):
message = _make_test_message(
Expand Down
4 changes: 2 additions & 2 deletions lib/iris/tests/unit/util/test_new_axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# Import iris.tests first so that some things can be initialised before
# importing anything else.
import iris.tests as tests
import iris.tests.stock as stock

import copy
import dask.array as da
Expand Down Expand Up @@ -143,9 +144,8 @@ def test_lazy_data(self):
self.assertTrue(res.has_lazy_data())
self.assertEqual(res.shape, (1,) + cube.shape)

@tests.skip_biggus
def test_masked_unit_array(self):
cube = tests.stock.simple_3d_mask()
cube = stock.simple_3d_mask()
test_cube = cube[0, 0, 0]
test_cube = new_axis(test_cube, 'longitude')
test_cube = new_axis(test_cube, 'latitude')
Expand Down