This commit is contained in:
li-xl 2021-03-12 15:35:05 +08:00
commit dd6394e656
3 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@
# This file is subject to the terms and conditions defined in
# file 'LICENSE.txt', which is part of this source code package.
# ***************************************************************
__version__ = '1.2.2.44'
__version__ = '1.2.2.45'
from . import lock
with lock.lock_scope():
ori_int = int

View File

@ -180,7 +180,7 @@ def _setitem_old(x, slices, value):
def getitem(x, slices):
if isinstance(slices, jt.Var) and slices.dtype == "bool":
return getitem(x, slices.where())
if isinstance(slices, Sequence):
if isinstance(slices, tuple):
ss = []
for s in slices:
if isinstance(s, jt.Var) and s.dtype == "bool":
@ -193,7 +193,7 @@ def getitem(x, slices):
def setitem(x, slices, value):
if isinstance(slices, jt.Var) and slices.dtype == "bool":
slices = tuple(slices.where())
elif isinstance(slices, Sequence):
elif isinstance(slices, tuple):
ss = []
for s in slices:
if isinstance(s, jt.Var) and s.dtype == "bool":

View File

@ -81,8 +81,8 @@ void ArrayOp::jit_prepare(JK& jk) {
// fill or find cbuffer for const var pass
if (output->dtype().dsize() == 4) {
auto x = abs(ptr<int32>()[0]);
auto y = abs(ptr<float32>()[0]);
auto x = std::abs(ptr<int32>()[0]);
auto y = std::abs(ptr<float32>()[0]);
auto z = ptr<uint32>()[0];
if ((x<=2) || (y==1.0f || y==2.0f))
jk << _CS("[o:") << z << ']';