-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CodeStyle] use np.testing.assert_array_equal instead of self.assertTrue(np.array_equal(...)) #44947
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
b8b4034
to
73be70a
Compare
很抱歉,经过我们的反复讨论,你的PR暂未达到合入标准,请阅读飞桨原生算子开发规范,你可以重新提交新的PR,我们先将此PR关闭,感谢你的贡献。 |
这不是修复导致的错误,这些是原来 `self.assertTrue(..., True)` 的错误用法,因此在修复后将其认为位置参数 `err_msg`
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个文件看起来全是 change 是因为原来文件是 CRLF 换行的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
Others
PR changes
Others
Describe
使用
np.testing.assert_array_equal(...)
替换self.assertTrue(np.array_equal(...))
,以优化单测报错信息Changes
self.assertTrue(np.array_equal(...))
->np.testing.assert_array_equal(...)
self.assertEqual(np.array_equal(...), True)
->np.testing.assert_array_equal(...)
self.assertTrue(numpy.array_equal(...))
->np.testing.assert_array_equal(...)
self.assertTrue(np.array_equal(...), True)
移除True