From 324f1fe8256b9358a6dfcee7f3081561e2d9705d Mon Sep 17 00:00:00 2001 From: Lutz Roeder Date: Fri, 21 Feb 2025 20:54:20 -0600 Subject: [PATCH] Update python.js (#842) --- source/python.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/python.js b/source/python.js index 28d3704460..2d69d77ec2 100644 --- a/source/python.js +++ b/source/python.js @@ -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) {