提交 77f0df8a authored 作者: Brandon T. Willard's avatar Brandon T. Willard 提交者: Brandon T. Willard

Remove ScanArgs.create_empty

上级 01325815
...@@ -854,25 +854,6 @@ class ScanArgs: ...@@ -854,25 +854,6 @@ class ScanArgs:
clone=clone, clone=clone,
) )
@classmethod
def create_empty(cls) -> "ScanArgs":
from aesara.scan.op import ScanInfo
info = ScanInfo(
n_seqs=0,
n_mit_mot=0,
n_mit_sot=0,
tap_array=(),
n_sit_sot=0,
n_nit_sot=0,
n_shared_outs=0,
n_mit_mot_outs=0,
mit_mot_out_slices=(),
)
res = cls([1], [], [], [], info, False)
res.n_steps = None
return res
@property @property
def n_nit_sot(self): def n_nit_sot(self):
# This is just a hack that allows us to use `Scan.get_oinp_iinp_iout_oout_mappings` # This is just a hack that allows us to use `Scan.get_oinp_iinp_iout_oout_mappings`
......
...@@ -79,14 +79,6 @@ def create_test_hmm(): ...@@ -79,14 +79,6 @@ def create_test_hmm():
def test_ScanArgs(): def test_ScanArgs():
# Make sure we can create an empty `ScanArgs`
scan_args = ScanArgs.create_empty()
assert scan_args.n_steps is None
for name in scan_args.field_names:
if name == "n_steps":
continue
assert len(getattr(scan_args, name)) == 0
with pytest.raises(TypeError): with pytest.raises(TypeError):
ScanArgs.from_node(at.ones(2).owner) ScanArgs.from_node(at.ones(2).owner)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论