Skip to content

Commit

Permalink
Update python.js (#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Feb 22, 2025
1 parent 7e81cc0 commit 324f1fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/python.js
Original file line number Diff line number Diff line change
Expand Up @@ -5624,14 +5624,14 @@ python.Execution = class {
}
});
this.registerFunction('torch._C.isinstance', (stack, types) => {
const ty = torch._C.pop(stack).type();
const ty = stack.pop().type();
for (const candidate of types) {
if (ty.isSubtypeOf(candidate)) {
torch._C.push(stack, true);
stack.push(true);
return;
}
}
torch._C.push(stack, false);
stack.push(false);
});
this.registerType('torch._C.Tuple', class {
constructor(elements) {
Expand Down

0 comments on commit 324f1fe

Please sign in to comment.