Skip to content

Commit

Permalink
Merge pull request #467 from 27rabbitlt/fix_pypy_dict_pointer_nonnull
Browse files Browse the repository at this point in the history
fix: under pypy, when no dict args given, kwds is non-null
  • Loading branch information
FrancescAlted authored Jan 25, 2024
2 parents 808221d + 8376c9f commit bec47c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion numexpr/interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ NumExpr_run(NumExprObject *self, PyObject *args, PyObject *kwds)
memset(operands, 0, sizeof(operands));
memset(dtypes, 0, sizeof(dtypes));

if (kwds) {
if (kwds && PyDict_Size(kwds) > 0) {
tmp = PyDict_GetItemString(kwds, "casting"); // borrowed ref
if (tmp != NULL && !PyArray_CastingConverter(tmp, &casting)) {
return NULL;
Expand Down

0 comments on commit bec47c7

Please sign in to comment.