<commit_before>""" demo for the algorithm runtime growth of a single ensemble transform update step
on a single cell """

from __future__ import division

from __future__ import absolute_import

from firedrake_da import *

import numpy as np

import matplotlib.pyplot as plot

import time


# create the mesh hierarchy (needed for coarsening localisation)
mesh = UnitIntervalMesh(5)
mesh_hierarchy = MeshHierarchy(mesh, 1)

# set used mesh to the bottom mesh
mesh = mesh_hierarchy[-1]

V = FunctionSpace(mesh, 'DG', 0)
fs = FunctionSpace(mesh, 'DG', 0)

# the coordinates of observation (only cell)
ny = 3
coords = []
obs = []
for i in range(ny):
    coords.append(np.random.uniform(0, 1, (2)))
    obs.append(np.random.uniform(0, 1, 1))
coords = tuple(coords)
obs = tuple(obs)

observation_operator = Observations(V)

# range of sample sizes
ns = 4 * (2 ** np.linspace(0, 7, 8))

# preallocate rmse array
time_rloc_0 = np.zeros(len(ns))
time_rloc_1 = np.zeros(len(ns))


# define the ensemble transform update step
def ensemble_transform_step(V, n, observation_operator, coords, obs, sigma, lf):<commit_msg>altered dimension of coord<commit_after>""" demo for the algorithm runtime growth of a single ensemble transform update step
on a single cell """

from __future__ import division

from __future__ import absolute_import

from firedrake_da import *

import numpy as np

import matplotlib.pyplot as plot

import time


# create the mesh hierarchy (needed for coarsening localisation)
mesh = UnitIntervalMesh(5)
mesh_hierarchy = MeshHierarchy(mesh, 1)

# set used mesh to the bottom mesh
mesh = mesh_hierarchy[-1]

V = FunctionSpace(mesh, 'DG', 0)
fs = FunctionSpace(mesh, 'DG', 0)

# the coordinates of observation (only cell)
ny = 3
coords = []
obs = []
for i in range(ny):
    coords.append(np.random.uniform(0, 1, 1))
    obs.append(np.random.uniform(0, 1, 1))

coords = tuple(coords)
obs = tuple(obs)

observation_operator = Observations(V)

# range of sample sizes
ns = 4 * (2 ** np.linspace(0, 7, 8))

# preallocate rmse array
time_rloc_0 = np.zeros(len(ns))
time_rloc_1 = np.zeros(len(ns))


# define the ensemble transform update step
def ensemble_transform_step(V, n, observation_operator, coords, obs, sigma, lf):
{'fraction_non_alphanumeric': 0.10412926391382406, 'fraction_numerical': 0.017055655296229804, 'mean_word_length': 4.912466843501326, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1094514', 'n_tokens_mistral': 774, 'n_tokens_neox': 740, 'n_words': 254}