提交 aac39454 authored 作者: Hengjean's avatar Hengjean

Optimized Remove op.

上级 19107a6b
...@@ -192,12 +192,12 @@ class Remove(Op): ...@@ -192,12 +192,12 @@ class Remove(Op):
being thrown when trying to remove a matrix from a matrices list being thrown when trying to remove a matrix from a matrices list
""" """
if isinstance(toRemove, numpy.ndarray): if isinstance(toRemove, numpy.ndarray):
for y in x: for y in range(out[0].__len__()):
if numpy.array_equal(y, toRemove): if numpy.array_equal(out[0][y], toRemove):
toRemove = y del out[0][y]
break break
else:
out[0].remove(toRemove) out[0].remove(toRemove)
def __str__(self): def __str__(self):
return self.__class__.__name__ return self.__class__.__name__
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论