diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2020-02-04 14:35:09 +0000 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2020-02-08 21:23:35 +0000 |
commit | d0b7b6638fe7496d25a488a179d79879748075fa (patch) | |
tree | 69333c89bd5181ba680b15caf66ae96e3084b029 /doc | |
parent | 48c0b1426ff81c8da3832fd6fb162dfbc1aa4601 (diff) | |
download | numpy-d0b7b6638fe7496d25a488a179d79879748075fa.tar.gz |
ENH: Implement the buffer protocol on numpy str_ scalars
This eliminates the need for special casing in `np.generic.__reduce__`
Diffstat (limited to 'doc')
-rw-r--r-- | doc/release/upcoming_changes/15385.new_feature.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/release/upcoming_changes/15385.new_feature.rst b/doc/release/upcoming_changes/15385.new_feature.rst new file mode 100644 index 000000000..24e9b793c --- /dev/null +++ b/doc/release/upcoming_changes/15385.new_feature.rst @@ -0,0 +1,5 @@ +``np.str_`` scalars now support the buffer protocol +--------------------------------------------------- +``np.str_`` arrays are always stored as UCS4, so the corresponding scalars +now expose this through the buffer interface, meaning +``memoryview(np.str_('test'))`` now works. |