MonoshiTonmoy/Code_Statement_Prediction_Dataset huggingface dataset:
Project Name: combatopera+aridity
Language: Python
Statement Type: Assignment

Source Code:
def execute(self, entry):
        directives = []
        for i, word in enumerate(entry.words()):
            def append(resolvable):
                directives.append((resolvable.directivevalue, i))
                raise self.Enough
            try:
                self.getresolvables(word.cat(), append)
            except (AttributeError, CatNotSupportedException, self.Enough):
                pass
        if 1 != len(directives):
            raise UnsupportedEntryException("Expected 1 directive but %s found: %s" % (directives, entry))
        d, i = directives[0]
        d(entry.subentry(0, i), entry.phrase(i + 1), self)

execute(self=Context(SuperContext(), False), entry=Entry([Text('ns'), Text('woo'), Blank(' '), Text('='), Blank(' '), Text('yay')]), self.islist=False, self.parent=SuperContext(), self.resolvables=OrderedDict([('here', Text('/tmp'))]))

Selected Statement: d, i = directives[0]

Function Input:
self: Context(SuperContext(), False)
entry: Entry([Text('ns'), Text('woo'), Blank(' '), Text('='), Blank(' '), Text('yay')])
self.islist: False
self.parent: SuperContext()
self.resolvables: OrderedDict([('here', Text('/tmp'))])

Variable Values Before Statement:
directives: [(<aridimpl.directives.Equals object at 0x7fe13ba8cd60>, 2)]


Variable States During Runtime (line, value):
self: 1
Context(SuperContext(), False)
entry: 1
Entry([Text('ns'), Text('woo'), Blank(' '), Text('='), Blank(' '), Text('yay')])
self.islist: 1
False
self.parent: 1
SuperContext()
self.resolvables: 1
OrderedDict([('here', Text('/tmp'))])
14
OrderedDict([('here', Text('/tmp')), ('ns', Context(Context(SuperContext(), False), False))])
directives: 2
8
[(<aridimpl.directives.Equals object at 0x7fe13ba8cd60>, 2)]
word: 3
Text('ns')
3
Text('woo')
3
Text('=')
3
Text('yay')
i: 3
0
3
1
3
2
3
3
13
2
append: 4
<function AbstractContext.execute.<locals>.append at 0x7fe139b030d0>
4
<function AbstractContext.execute.<locals>.append at 0x7fe139c4a790>
4
<function AbstractContext.execute.<locals>.append at 0x7fe139b035e0>
4
<function AbstractContext.execute.<locals>.append at 0x7fe139c4a790>
d: 13
Project Name: JGoutin+rfs
Language: Python
Statement Type: Assignment

Source Code:
def check_head_methods(system, m_time, path=None):
    """
    Tests head methods.

    args:
        io_object (pycosio._core.io_system.SystemBase subclass):
            Object to test
    """
    path = path or 'directory/file'
    assert system.getmtime(path) == pytest.approx(m_time, 1)
    assert system.getsize(path) == SIZE

check_head_methods(system={_storage_parameters={}, _unsecure=False, _client=None, _roots=('http://', 'https://')}, m_time=1712175490.9806323, path=None)

Selected Statement: path = path or 'directory/file'

Function Input:
system: {_storage_parameters={}, _unsecure=False, _client=None, _roots=('http://', 'https://')}
m_time: 1712175490.9806323
path: None

Variable Values Before Statement:
path: None

Value After Statement Execution: 'directory/file'

Variable States During Runtime (line, value):
system: 1
{_storage_parameters={}, _unsecure=False, _client=None, _roots=('http://', 'https://')}
10
{_storage_parameters={}, _unsecure=False, _client=<tests.test_http.test_http_raw_io.<locals>.Session object at 0x7ffa22ae3bb0>, _roots=('http://', 'https://')}
m_time: 1
1712175490.9806323
path: 1
None
9
'directory/file'
Project Name: pdfminer+pdfminer.six
Language: Python
Statement Type: Assignment

Source Code:
def set_bbox(self, bbox: Rect) -> None:
        (x0, y0, x1, y1) = bbox
        self.x0 = x0
        self.y0 = y0
        self.x1 = x1
        self.y1 = y1
        self.width = x1 - x0
        self.height = y1 - y0
        self.bbox = bbox

set_bbox(self=REPR FAILED, bbox=[0, 100, 0, 100])

Selected Statement: self.width = x1 - x0

Function Input:
self: REPR FAILED
bbox: [0, 100, 0, 100]

Variable Values Before Statement:
x1: 0
x0: 0

Value After Statement Execution: 0

Variable States During Runtime (line, value):
self: 1
REPR FAILED
9
<LTContainer 0.000,100.000,0.000,100.000>
bbox: 1
[0, 100, 0, 100]
x0: 2
0
y0: 2
100
x1: 2
0
y1: 2
100
self.x0: 3
0
self.y0: 4
100
self.x1: 5
0
self.y1: 6
100
self.width: 7
0
self.height: 8
0
self.bbox: 9
[0, 100, 0, 100]
Project Name: mher+flower
Language: Python
Statement Type: Assignment

Source Code:
def task_succeeded_events(worker, id=None, name=None, runtime=0.1234, retries=0, eta=None):
    id = id or uuid()
    name = name or 'sometask'
    return [Event('task-received', uuid=id, name=name,
                  args='(2, 2)', kwargs="{'foo': 'bar'}",
                  retries=retries, eta=eta, hostname=worker),
            Event('task-started', uuid=id, hostname=worker),
            Event('task-succeeded', uuid=id, result='4',
                  runtime=runtime, hostname=worker)]

task_succeeded_events(worker='worker1', id=None, name=None, runtime=0.1234, retries=0, eta=None)

Selected Statement: name = name or 'sometask'

Function Input:
worker: 'worker1'
id: None
name: None
runtime: 0.1234
retries: 0
eta: None

Variable Values Before Statement:
name: None

Value After Statement Execution: 'sometask'

Variable States During Runtime (line, value):
worker: 1
'worker1'
id: 1
None
2
'95b9f5c5-3693-4723-a64a-acb161eab235'
name: 1
None
3
'sometask'
runtime: 1
0.1234
retries: 1
0
eta: 1
None
Project Name: mher+flower
Language: Python
Statement Type: Assignment

Source Code:
def apply_env_options():
    "apply options passed through environment variables"
    env_options = filter(is_flower_envvar, os.environ)
    for env_var_name in env_options:
        name = env_var_name.replace(ENV_VAR_PREFIX, '', 1).lower()
        value = os.environ[env_var_name]
        try:
            option = options._options[name]  # pylint: disable=protected-access
        except KeyError:
            option = options._options[name.replace('_', '-')]  # pylint: disable=protected-access
        if option.multiple:
            value = [option.type(i) for i in value.split(',')]
        else:
            if option.type is bool:
                value = bool(strtobool(value))
            else:
                value = option.type(value)
        setattr(options, name, value)

apply_env_options()

Selected Statement: value = os.environ[env_var_name]

Function Input:

Variable Values Before Statement:
env_var_name: 'FLOWER_AUTO_REFRESH'

Value After Statement Execution: 'false'

Variable States During Runtime (line, value):
env_options: 3
REPR FAILED
env_var_name: 4
'FLOWER_AUTO_REFRESH'
name: 5
'auto_refresh'
value: 6
'false'
15
False
option: 10
{name='auto_refresh', help='refresh workerss', metavar=None, multiple=False, file_name='/local/rcs/jinjun/code/pytrace-collector/logs/self_collected/tried/mher+flower/mher+flower/flower/options.py', group_name='/local/rcs/jinjun/code/pytrace-collector/logs/self_collected/tried/mher+flower/mher+flower/flower/options.py', callback=None, default=True, _value=<object object at 0x7fc8330cff40>}
18
{name='auto_refresh', help='refresh workerss', metavar=None, multiple=False, file_name='/local/rcs/jinjun/code/pytrace-collector/logs/self_collected/tried/mher+flower/mher+flower/flower/options.py', group_name='/local/rcs/jinjun/code/pytrace-collector/logs/self_collected/tried/mher+flower/mher+flower/flower/options.py', callback=None, default=True, _value=False}
Project Name: mher+flower
Language: Python
Statement Type: Assignment

Source Code:
def task_failed_events(worker, id=None, name=None):
    id = id or uuid()
    name = name or 'sometask'
    return [Event('task-received', uuid=id, name=name,
                  args='(2, 2)', kwargs="{'foo': 'bar'}",
                  retries=0, eta=None, hostname=worker),
            Event('task-started', uuid=id, hostname=worker),
            Event('task-failed', uuid=id, exception="KeyError('foo')",
                  traceback='line 1 at main', hostname=worker)]

task_failed_events(worker='worker3', id=None, name=None)

Selected Statement: name = name or 'sometask'

Function Input:
worker: 'worker3'
id: None
name: None

Variable Values Before Statement:
name: None

Value After Statement Execution: 'sometask'

Variable States During Runtime (line, value):
worker: 1
'worker3'
id: 1
None
2
'74ab0138-27c4-4571-9127-2f5241170ad8'
name: 1
None
3
'sometask'
Project Name: dylanaraps+pywal
Language: Python
Statement Type: Assignment

Source Code:
def file(input_file, light=False):
    """Import colorscheme from json file."""
    util.create_dir(os.path.join(CONF_DIR, "colorschemes/light/"))
    util.create_dir(os.path.join(CONF_DIR, "colorschemes/dark/"))

    theme_name = ".".join((input_file, "json"))
    bri = "light" if light else "dark"

    user_theme_file = os.path.join(CONF_DIR, "colorschemes", bri, theme_name)
    theme_file = os.path.join(MODULE_DIR, "colorschemes", bri, theme_name)

    # Find the theme file.
    if input_file in ("random", "random_dark"):
        theme_file = get_random_theme()

    elif input_file == "random_light":
        theme_file = get_random_theme(light)

    elif input_file == "random_user":
        theme_file = get_random_theme_user()

    elif os.path.isfile(user_theme_file):
        theme_file = user_theme_file

    elif os.path.isfile(input_file):
        theme_file = input_file

    # Parse the theme file.
    if os.path.isfile(theme_file):
        logging.info("Set theme to \033[1;37m%s\033[0m.",
                     os.path.basename(theme_file))
        util.save_file(os.path.basename(theme_file),
                       os.path.join(CACHE_DIR, "last_used_theme"))
        return parse(theme_file)

    logging.error("No %s colorscheme file found.", bri)
    logging.error("Try adding   '-l' to set light themes.")
    logging.error("Try removing '-l' to set dark themes.")
    sys.exit(1)

file(input_file='tests/test_files/test_file.json', light=False)

Selected Statement: bri = "light" if light else "dark"

Function Input:
input_file: 'tests/test_files/test_file.json'
light: False

Variable Values Before Statement:
light: False

Value After Statement Execution: 'dark'

Variable States During Runtime (line, value):
input_file: 1
'tests/test_files/test_file.json'
light: 1
False
theme_name: 6
'tests/test_files/test_file.json.json'
bri: 7
'dark'
user_theme_file: 9
'/home/jinjun/.config/wal/colorschemes/dark/tests/test_files/test_file.json.json'
theme_file: 10
'/local/rcs/jinjun/code/pytrace-collector/logs/self_collected/tried/dylanaraps+pywal/dylanaraps+pywal/pywal/colorschemes/dark/tests/test_files/test_file.json.json'
26
'tests/test_files/test_file.json'
Project Name: google-research+arxiv-latex-cleaner
Language: Python
Statement Type: Assignment

Source Code:
def _search_reference(filename, contents, strict=False):
  """Returns a match object if filename is referenced in contents, and None otherwise.

  If not strict mode, path prefix and extension are optional.
  """
  if strict:
    # regex pattern for strict=True for path/to/img.ext:
    # \{[\s%]*path/to/img\.ext[\s%]*\}
    filename_regex = filename.replace('.', r'\.')
  else:
    filename_path = Path(filename)

    # make extension optional
    root, extension = filename_path.stem, filename_path.suffix
    basename_regex = '{}({})?'.format(
        regex.escape(root), regex.escape(extension)
    )

    # iterate through parent fragments to make path prefix optional
    path_prefix_regex = ''
    for fragment in reversed(filename_path.parents):
      if fragment.name == '.':
        continue
      fragment = regex.escape(fragment.name)
      path_prefix_regex = '({}{}{})?'.format(
          path_prefix_regex, fragment, os.sep
      )

    # Regex pattern for strict=True for path/to/img.ext:
    # \{[\s%]*(<path_prefix>)?<basename>(<ext>)?[\s%]*\}
    filename_regex = path_prefix_regex + basename_regex

  # Some files 'path/to/file' are referenced in tex as './path/to/file' thus
  # adds prefix for relative paths starting with './' or '.\' to regex search.
  filename_regex = r'(.' + os.sep + r')?' + filename_regex

  # Pads with braces and optional whitespace/comment characters.
  patn = r'\{{[\s%]*{}[\s%]*\}}'.format(filename_regex)
  # Picture references in LaTeX are allowed to be in different cases.
  return regex.search(patn, contents, regex.IGNORECASE)

_search_reference(filename='to/img.ext', contents='{img.ext}', strict=False)

Selected Statement: filename_regex = path_prefix_regex + basename_regex

Function Input:
filename: 'to/img.ext'
contents: '{img.ext}'
strict: False

Variable Values Before Statement:
path_prefix_regex: '((/)?to/)?'
basename_regex: 'img(\\.ext)?'

Value After Statement Execution: '((/)?to/)?img(\\.ext)?'

Variable States During Runtime (line, value):
filename: 1
'to/img.ext'
contents: 1
'{img.ext}'
strict: 1
False
filename_path: 11
PosixPath('to/img.ext')
root: 14
'img'
extension: 14
'.ext'
basename_regex: 15
'img(\\.ext)?'
path_prefix_regex: 20
''
25
'(/)?'
25
'((/)?to/)?'
fragment: 21
PosixPath('.')
24
''
21
PosixPath('to')
24
'to'
filename_regex: 31
'((/)?to/)?img(\\.ext)?'
35
'(./)?((/)?to/)?img(\\.ext)?'
patn: 38
'\\{[\\s%]*(./)?((/)?to/)?img(\\.ext)?[\\s%]*\\}'
Project Name: davidhalter+jedi
Language: Python
Statement Type: Assignment

Source Code:
def _get_code(code_lines, start_pos, end_pos):
    # Get relevant lines.
    lines = code_lines[start_pos[0] - 1:end_pos[0]]
    # Remove the parts at the end of the line.
    lines[-1] = lines[-1][:end_pos[1]]
    # Remove first line indentation.
    lines[0] = lines[0][start_pos[1]:]
    return ''.join(lines)

_get_code(code_lines=['\n', 'import json\n', 'json.lo'], start_pos=(3, 0), end_pos=(3, 5))

Selected Statement: lines = code_lines[start_pos[0] - 1:end_pos[0]]

Function Input:
code_lines: 

import json

json.lo
start_pos: (3, 0)
end_pos: (3, 5)

Variable Values Before Statement:
code_lines: 

import json

json.lo

Value After Statement Execution: json.lo

Variable States During Runtime (line, value):
code_lines: 1


import json

json.lo
start_pos: 1
(3, 0)
end_pos: 1
(3, 5)
lines: 3
json.lo
5
json.
Project Name: danwin+fairways_py
Language: Python
Statement Type: Assignment

Source Code:
def dict_factory(cursor, row):
    d = {}
    for idx, col in enumerate(cursor.description):
        d[col[0]] = row[idx]
    return d

dict_factory(cursor=REPR FAILED, row=('My Way',))

Selected Statement: d[col[0]] = row[idx]

Function Input:
cursor: REPR FAILED
row: ('My Way',)

Variable Values Before Statement:
row: ('My Way',)
idx: 0

Value After Statement Execution: name: My Way

Variable States During Runtime (line, value):
cursor: 1
REPR FAILED
row: 1
('My Way',)
d: 2
4
name: My Way
idx: 3
0
col: 3
('name', None, None, None, None, None, None)
Project Name: d3rp+clima
Language: Python
Statement Type: Assignment

Source Code:
def SeparateFlagArgs(args: list):
  """Splits a list of args into those for Flags and those for Fire.

  If an isolated '--' arg is not present in the arg list, then all of the args
  are for Fire. If there is an isolated '--', then the args after the final '--'
  are flag args, and the rest of the args are fire args.

  Args:
    args: The list of arguments received by the Fire command.
  Returns:
    A tuple with the Fire args (a list), followed by the Flag args (a list).
  """
  if len(args) > 0 and (args[-1] == '-h' or args[-1] == '--help') and '--' not in args:
    args.pop()
    args.append('--')
    args.append('-h')

  if '--' in args:
    separator_index = len(args) - 1 - args[::-1].index('--')  # index of last --
    flag_args = args[separator_index + 1:]
    args = args[:separator_index]
    return args, flag_args

  return args, []

SeparateFlagArgs(args=['a', 'b', '--'])

Selected Statement: flag_args = args[separator_index + 1:]

Function Input:
args: a, b, --

Variable Values Before Statement:
args: a, b, --


Variable States During Runtime (line, value):
args: 1
a, b, --
21
a, b
separator_index: 19
2
flag_args: 20
Project Name: paul-gauthier+aider
Language: Python
Statement Type: Assignment

Source Code:
def find_original_update_blocks(content, fence=DEFAULT_FENCE):
    # make sure we end with a newline, otherwise the regex will miss <<UPD on the last line
    if not content.endswith("\n"):
        content = content + "\n"

    pieces = re.split(split_re, content)

    pieces.reverse()
    processed = []

    # Keep using the same filename in cases where GPT produces an edit block
    # without a filename.
    current_filename = None
    try:
        while pieces:
            cur = pieces.pop()

            if cur in (DIVIDER, UPDATED):
                processed.append(cur)
                raise ValueError(f"Unexpected {cur}")

            if cur.strip() != HEAD:
                processed.append(cur)
                continue

            processed.append(cur)  # original_marker

            filename = strip_filename(processed[-2].splitlines()[-1], fence)
            try:
                if not filename:
                    filename = strip_filename(processed[-2].splitlines()[-2], fence)
                if not filename:
                    if current_filename:
                        filename = current_filename
                    else:
                        raise ValueError(missing_filename_err)
            except IndexError:
                if current_filename:
                    filename = current_filename
                else:
                    raise ValueError(missing_filename_err)

            current_filename = filename

            original_text = pieces.pop()
            processed.append(original_text)

            divider_marker = pieces.pop()
            processed.append(divider_marker)
            if divider_marker.strip() != DIVIDER:
                raise ValueError(f"Expected `{DIVIDER}` not {divider_marker.strip()}")

            updated_text = pieces.pop()
            processed.append(updated_text)

            updated_marker = pieces.pop()
            processed.append(updated_marker)
            if updated_marker.strip() != UPDATED:
                raise ValueError(f"Expected `{UPDATED}` not `{updated_marker.strip()}")

            yield filename, original_text, updated_text
    except ValueError as e:
        processed = "".join(processed)
        err = e.args[0]
        raise ValueError(f"{processed}\n^^^ {err}")
    except IndexError:
        processed = "".join(processed)
        raise ValueError(f"{processed}\n^^^ Incomplete SEARCH/REPLACE block.")
    except Exception:
        processed = "".join(processed)
        raise ValueError(f"{processed}\n^^^ Error parsing SEARCH/REPLACE block.")

find_original_update_blocks(content='ok', fence=('<source>', '</source>'))

Selected Statement: content = content + "\n"

Function Input:
content: 'ok'
fence: ('<source>', '</source>')

Variable Values Before Statement:
content: 'ok'

Value After Statement Execution: 'ok\n'

Variable States During Runtime (line, value):
content: 1
'ok'
4
'ok\n'
fence: 1
('<source>', '</source>')
pieces: 6
ok

16
processed: 9
23
ok

current_filename: 13
None
cur: 16
'ok\n'
Project Name: SkyTruth+gpsd_format
Language: Python
Statement Type: Assignment

Source Code:
def str2datetime(string):
    """
    Convert a normalized Benthos timestamp to a datetime object

    Parameters
    ----------
    string : str
        String to convert
    """

    if string == "0000-00-00T24:60:60Z":
        return None

    ms = string[20:-1]
    ms += "000000"[:6 - len(ms)]
    return datetime.datetime(
        int(string[:4]),
        int(string[5:7]),
        int(string[8:10]),
        int(string[11:13]),
        int(string[14:16]),
        int(string[17:19]),
        int(ms))

str2datetime(string='1970-01-01T00:00:00.0Z')

Selected Statement: ms = string[20:-1]

Function Input:
string: '1970-01-01T00:00:00.0Z'

Variable Values Before Statement:
string: '1970-01-01T00:00:00.0Z'

Value After Statement Execution: '0'

Variable States During Runtime (line, value):
string: 1
'1970-01-01T00:00:00.0Z'
ms: 14
'0'
15
'000000'
Project Name: OxfordHED+sunbear
Language: Python
Statement Type: Assignment

Source Code:
def get_idx(ndim, axis=None, axis_idx=None):
    s = [midx] * ndim
    if axis is not None:
        if hasattr(axis, "__iter__"):
            for ax, axidx in zip(axis, axis_idx):
                s[ax] = axidx
        else:
            s[axis] = axis_idx
    return tuple(s)

get_idx(ndim=1, axis=0, axis_idx=slice(None, -2, None))

Selected Statement: s = [midx] * ndim

Function Input:
ndim: 1
axis: 0
axis_idx: slice(None, -2, None)

Variable Values Before Statement:
ndim: 1

Value After Statement Execution: [slice(1, -1, None)]

Variable States During Runtime (line, value):
ndim: 1
1
axis: 1
0
axis_idx: 1
slice(None, -2, None)
s: 2
[slice(1, -1, None)]
8
[slice(None, -2, None)]
Project Name: OxfordHED+sunbear
Language: Python
Statement Type: Assignment

Source Code:
def _test_grad2_nd(n, ndim):
    coords = [np.arange(n)] * ndim
    xc = np.meshgrid(*coords, indexing="ij")

    # u = sum_i(xc[i]**2)
    u = reduce(lambda x,y: x+y**2, xc, 0.0)
    ucopy = np.copy(u)

    # check the gradient values
    gu = np.zeros(tuple([n-2]*ndim))
    gu2 = gu + 2.0
    for i in range(ndim):
        for j in range(ndim):
            if i == j:
                assert grad2(u, axes=(i,j)) == pytest.approx(gu2)
            else:
                assert grad2(u, axes=(i,j)) == pytest.approx(gu)

    # check if u is unchanged
    assert np.all(u == ucopy)

_test_grad2_nd(n=32, ndim=1)

Selected Statement: gu2 = gu + 2.0

Function Input:
n: 32
ndim: 1

Variable Values Before Statement:
gu: array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,       0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])

Value After Statement Execution: array([2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.,       2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.])

Variable States During Runtime (line, value):
n: 1
32
ndim: 1
1
coords: 2
[array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,       17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31])]
xc: 3
[array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,       17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31])]
u: 6
array([  0.,   1.,   4.,   9.,  16.,  25.,  36.,  49.,  64.,  81., 100.,       121., 144., 169., 196., 225., 256., 289., 324., 361., 400., 441.,       484., 529., 576., 625., 676., 729., 784., 841., 900., 961.])
ucopy: 7
array([  0.,   1.,   4.,   9.,  16.,  25.,  36.,  49.,  64.,  81., 100.,       121., 144., 169., 196., 225., 256., 289., 324., 361., 400., 441.,       484., 529., 576., 625., 676., 729., 784., 841., 900., 961.])
gu: 10
array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,       0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])
gu2: 11
array([2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.,       2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.])
i: 12
0
j: 13
0
@py_assert2: 15
None
@py_assert4: 15
None
@py_assert8: 15
None
@py_assert11: 15
None
@py_assert6: 15
None
@py_assert1: 20
None
Project Name: OxfordHED+sunbear
Language: Python
Statement Type: Assignment

Source Code:
def _get_default_expanded_coordinate(shape, ndim):
    x_coords = []
    for i in range(ndim):
        idx = [None] * ndim
        idx[i] = slice(None, None, None)
        x_coords.append(np.arange(shape[i])[tuple(idx)])
    return x_coords

_get_default_expanded_coordinate(shape=array([102]), ndim=1)

Selected Statement: idx = [None] * ndim

Function Input:
shape: array([102])
ndim: 1

Variable Values Before Statement:
ndim: 1

Value After Statement Execution: [None]

Variable States During Runtime (line, value):
shape: 1
array([102])
ndim: 1
1
x_coords: 2
6
[array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,        13,  14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,        26,  27,  28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,        39,  40,  41,  42,  43,  44,  45,  46,  47,  48,  49,  50,  51,        52,  53,  54,  55,  56,  57,  58,  59,  60,  61,  62,  63,  64,        65,  66,  67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,        78,  79,  80,  81,  82,  83,  84,  85,  86,  87,  88,  89,  90,        91,  92,  93,  94,  95,  96,  97,  98,  99, 100, 101])]
i: 3
0
idx: 4
[None]
5
[slice(None, None, None)]