New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAINT: Cleanup remaining PyUString_ConcatAndDel use. #17409
Conversation
|
||
PyObject *shape2 = convert_shape_to_string(ndim, shape, ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a follow-up to this collection of PRs, its very temping to remove the third argument from this function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. It doesn't get used and is easy enough to add elsewhere if needed.
numpy/core/src/umath/ufunc_object.c
Outdated
if (doc == NULL) { | ||
return NULL; | ||
} | ||
// FIXME: check if ufunc docstrings can/should be UTF-8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the quetion behind this comment - the PR hasn't changed anything, has it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// FIXME: check if ufunc docstrings can/should be UTF-8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, let's remove that FIXME
though
The build_shape_string function is effectively a duplicate of the convert_shape_to_string function in common.c. All uses have now been replaced, so remove it.
18bd2da
to
e6030ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, tried to see if I find anything that might trip PyPy, but didn't manage. On the up-side, the code changes look very nice :).
The
build_shape_string
function has also been removes as a duplicate ofconvert_shape_to_string
.This should probably be squash merged.