提交 4af12379 authored 作者: Brandon T. Willard's avatar Brandon T. Willard 提交者: Brandon T. Willard

Remove xrange usage in scan_perform.pyx

上级 7890a34f
...@@ -59,7 +59,7 @@ from aesara.scan.utils import InnerFunctionError ...@@ -59,7 +59,7 @@ from aesara.scan.utils import InnerFunctionError
def get_version(): def get_version():
return 0.316 return 0.317
@cython.boundscheck(False) @cython.boundscheck(False)
def perform( def perform(
...@@ -369,7 +369,7 @@ def perform( ...@@ -369,7 +369,7 @@ def perform(
# the execution of the function. Also keep pointers to their data to # the execution of the function. Also keep pointers to their data to
# be able to detect cases where outputs reused the allocated object # be able to detect cases where outputs reused the allocated object
# but alter the memory region they refer to. # but alter the memory region they refer to.
for idx in xrange(nb_mitmot_in): for idx in range(nb_mitmot_in):
var = inner_input_storage[idx + n_seqs][0] var = inner_input_storage[idx + n_seqs][0]
old_mitmot_input_storage[idx] = var old_mitmot_input_storage[idx] = var
...@@ -397,7 +397,7 @@ def perform( ...@@ -397,7 +397,7 @@ def perform(
# 5.3 Copy over the values for mit_mot outputs # 5.3 Copy over the values for mit_mot outputs
mitmot_inp_offset = 0 mitmot_inp_offset = 0
mitmot_out_idx = 0 mitmot_out_idx = 0
for j in xrange(n_mit_mot): for j in range(n_mit_mot):
for k in mit_mot_out_slices[j]: for k in mit_mot_out_slices[j]:
if mitmots_preallocated[<unsigned int>mitmot_out_idx]: if mitmots_preallocated[<unsigned int>mitmot_out_idx]:
# This output tap has been preallocated. # This output tap has been preallocated.
......
...@@ -23,7 +23,7 @@ if not config.cxx: ...@@ -23,7 +23,7 @@ if not config.cxx:
_logger = logging.getLogger("aesara.scan.scan_perform") _logger = logging.getLogger("aesara.scan.scan_perform")
version = 0.316 # must match constant returned in function get_version() version = 0.317 # must match constant returned in function get_version()
need_reload = False need_reload = False
scan_perform: Optional[ModuleType] = None scan_perform: Optional[ModuleType] = None
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论