unused case where View adds invalid masked view [pr] (#8299)

code path does not hit this, and we might want to assert if it ever hits
This commit is contained in:
chenyu
2024-12-17 17:31:01 -05:00
committed by GitHub
parent 513d765c9e
commit 66b92b6061

View File

@@ -166,8 +166,6 @@ class View:
if vm1.contiguous and vm1.shape == vm2.shape: return vm2
if vm1.contiguous and vm1.size() == vm2.size() and (ret := vm2.reshape(vm1.shape)) is not None: return ret
if vm1.mask:
for b,e in vm1.mask:
if not resolve(b < e): return View.create(vm1.shape, (0,) * len(vm1.shape), 0, ((0,0),) * len(vm1.shape))
if (merged := vm2 + vm1.shrink(vm1.mask)) is None: return None
return merged.pad(tuple((b,s-e) for (b,e),s in zip(vm1.mask, vm1.shape)))
if not all_int(vm1.shape): return None