Conversation
bymasha
commented
Sep 23, 2026
| strides=None, order=None) | ||
|
|
||
| Provides a convenient view on arrays of string and unicode values. | ||
| Provides a convenient view on arrays of `str_` or `bytes_` values. |
Author
There was a problem hiding this comment.
Based on the build logs I need to fix this to str and bytes
bymasha
commented
Sep 23, 2026
| Length of each array element, in number of characters. Default is 1. | ||
| unicode : bool, optional | ||
| Are the array elements of type unicode (True) or string (False). | ||
| Are the array elements of type `str_` (True) or `bytes_` (False). |
Author
There was a problem hiding this comment.
Need to change this as well to str (True) or bytes (False)
Author
|
Will push the above later today. |
InessaPawson
requested changes
Sep 23, 2026
InessaPawson
left a comment
Member
There was a problem hiding this comment.
@bymasha Thank you for working on this! NumPy does rely on its test suite. Since the tests are currently failing, there is still some work to do before this is ready for review.
- Replace outdated str/unicode references with str_ / bytes_ (np.string_ and np.unicode_ were removed in favor of np.str_ and np.bytes_ in NumPy 2.0.) - Remove the outdated note stating that method availability depends on the Python version. See numpy#20062#
bymasha
force-pushed
the
doc-gh-20062-defchararray
branch
from
September 24, 2026 16:21
16a7012 to
811c51b
Compare
Author
|
Hi @InessaPawson this passes the tests now - ready for review! thank you! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR summary
Closes #20062 by addressing the remaining scope from the maintainer's last comment.
Problem
np.string_andnp.unicode_were removed in NumPy 2.0 in favor ofnp.bytes_andnp.str_, but the docstrings indefchararray.pyhave not been updated to reflect thatchararrayclass still mentioned "str or unicode", "string and unicode", etc in the docstringsThis PR
First time contributor introduction
Hey team, this is my first contribution to numpy - very exciting (: I use numpy daily in my work as a data engineer so would be awesome to make even a small contribution!
AI Disclosure
All the code changes were typed, no AI was used for that.
Did use Claude to scan through the
defchararray.pyafter I finished to make sure I haven't missed anything and it helped me find a couple of spots were the wording change was still needed. Did the corrections manually.