Skip to content

Commit

Permalink
Merge 861dd1b into 409f92c
Browse files Browse the repository at this point in the history
  • Loading branch information
bouweandela authored Jul 10, 2024
2 parents 409f92c + 861dd1b commit f8c1853
Show file tree
Hide file tree
Showing 4 changed files with 327 additions and 150 deletions.
16 changes: 9 additions & 7 deletions benchmarks/benchmarks/merge_concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ class Concatenate:
cube_list: CubeList

def setup(self):
source_cube = realistic_4d_w_everything()
second_cube = source_cube.copy()
first_dim_coord = second_cube.coord(dimensions=0, dim_coords=True)
first_dim_coord.points = (
first_dim_coord.points + np.ptp(first_dim_coord.points) + 1
)
self.cube_list = CubeList([source_cube, second_cube])
source_cube = realistic_4d_w_everything(lazy=True)
self.cube_list = CubeList([source_cube])
for _ in range(24):
next_cube = self.cube_list[-1].copy()
first_dim_coord = next_cube.coord(dimensions=0, dim_coords=True)
first_dim_coord.points = (
first_dim_coord.points + np.ptp(first_dim_coord.points) + 1
)
self.cube_list.append(next_cube)

def time_concatenate(self):
_ = self.cube_list.concatenate_cube()
Expand Down
Loading

0 comments on commit f8c1853

Please sign in to comment.