Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit828a6a3

Browse files
bddppqfacebook-github-bot
authored andcommitted
Use proper isnan check
Summary: Pull Requestresolved:#18663Differential Revision: D14699385Pulled By: bddppqfbshipit-source-id: 596ad3371e7704802591e49f7e1c55dc6cd2896f
1 parentcb39bd9 commit828a6a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎aten/src/TH/generic/THTensorMoreMath.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ void THTensor_(diag)(THTensor *r_, THTensor *t, int k)
544544
/* Emulate NumPy behavior of putting NaNs
545545
* at the end of an ascending list.*/
546546
#defineGT_OR_NAN(x, y) \
547-
((x != x&&y == y) || (x > y))
547+
((th_isnan(x)&&!(th_isnan(y))) || (x > y))
548548

549549
staticvoidTHTensor_(quicksortascend)(scalar_t *arr,int64_t *idx,int64_t elements,int64_t stride)
550550
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp