Hi all,

I'm writing to propose accepting my ByteStringDType NEP, with the intention
of including it as a new feature in NumPy 2.6.

The latest NEP text is here:
https://numpy.org/neps/nep-0058-bytestring-dtype.html

The mailing list thread discussing the NEP is here:
https://mail.python.org/archives/list/[email protected]/thread/O4BIZE4YIYAS2SYOMXIENVS7BP2NNNWI/

I don't think there are any remaining substantive discussion points. Joren
was worried about the original proposal to make the scalar type be a Python
bytes. The latest version as a new NumPy vbytes scalar because subtyping
bytes is much easier than subtyping str and trying to use it to represent
UTF-8 data.

Joren was also worried about the typing difficulties inherent with
StringDType and ByteStringDType's missing data support. I argued that
limitations of the type system shouldn't limit runtime behavior of NumPy's
features and that it's probably worth expanding the type system to support
behavior keyed to floating point values like nan now that there is a
concrete use-case in NumPy. I've spoken to Joren and I think he's fine with
the current text and ByteStringDType prototype.

The prototype currently lives in a draft PR (
https://github.com/numpy/numpy/pull/32772) which I plan to mark as ready to
merge next week. I'm also hoping we can merge
https://github.com/numpy/numpy/pull/32757, which deprecates implicit
coercion of bytes to strings (e.g. np.array(["a", b"b"])). It provides
shared machinery for dealing with this, which will let me avoid adding a
bunch of special cases for ByteStringDType.

If there are no substantive objections within 7 days from this email, then
the NEP will be accepted; see NEP 0 for more details.

Thanks for your time and consideration,

-Nathan
_______________________________________________
NumPy-Discussion mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/numpy-discussion.python.org
Member address: [email protected]

Reply via email to