Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Commit e975e83

Browse files
committed
Remove dtype kws.
1 parent 7773d63 commit e975e83

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

numba/openmp.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,12 @@ def replace_np_empty_with_cuda_shared(outlined_ir, typemap, calltypes, prefix, t
969969
afnty = typemap[stmt.value.func.name]
970970
afnty.get_call_type(typingctx, signature_args, {})
971971
if len(stmt.value.args) == 1:
972+
dtype_to_use = signature.return_type.dtype
973+
if len(stmt.value.kws) > 0:
974+
for kwarg in stmt.value.kws:
975+
if kwarg[0] == 'dtype':
976+
stmt.value.kws = list(filter(lambda x: x[0] != 'dtype', stmt.value.kws))
977+
break
972978
new_block_body.append(ir.Assign(
973979
ir.Global("np", np, lhs.loc),
974980
ir.Var(
@@ -978,7 +984,7 @@ def replace_np_empty_with_cuda_shared(outlined_ir, typemap, calltypes, prefix, t
978984
lhs.loc))
979985
typemap[new_block_body[-1].target.name] = types.Module(np)
980986
new_block_body.append(ir.Assign(
981-
ir.Expr.getattr(new_block_body[-1].target, str(signature.return_type.dtype), lhs.loc),
987+
ir.Expr.getattr(new_block_body[-1].target, str(dtype_to_use), lhs.loc),
982988
ir.Var(
983989
lhs.scope,
984990
mk_unique_var(".np_dtype"),

0 commit comments

Comments
 (0)