-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
drop the length from numpy
's fixed-width string dtypes
#9586
base: main
Are you sure you want to change the base?
Conversation
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, thanks!
Yes, this would be better in my opinion! |
how do we proceed, then? Merge this (after fixing the failing min-deps CI), ask if |
Yes, that’s probably the way to go
…On Thu, Oct 10, 2024 at 6:51 PM Justus Magin ***@***.***> wrote:
how do we proceed, then? Merge this (after fixing the failing min-deps
CI), ask if numpy.result_type can be changed, and remove it once we can
require a version of numpy that supports this?
—
Reply to this email directly, view it on GitHub
<#9586 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJJFVSTJCPVMIHB7YF2QKTZ2ZE2LAVCNFSM6AAAAABPOKUAHKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBUGYZDIMZVGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
By converting arrays of fixed-width string / bytes dtypes to their base dtype (
np.str_
andnp.bytes_
) innp.result_type
, we can avoid accidentally truncating the replacement strings inxr.where
.While this works, I wonder if we instead should ask
numpy
to do this for us? I.e.np.result_dtype(np.dtype("<U1"), str)
should returnnp.str_
, notnp.dtype("<U1")
.<U
dtypes #9180whats-new.rst