Skip to content
This repository was archived by the owner on Jun 27, 2025. It is now read-only.
This repository was archived by the owner on Jun 27, 2025. It is now read-only.

Null bytes short-circuiting Unicode comparison #8

@flexatone

Description

@flexatone

Empty string, null characters collide

>>> a1 = np.array(['', '\x000'], dtype='<U2')
>>> a1.flags.writeable = False
>>> FrozenAutoMap(a1)
NonUniqueError: 
>>> a1[0].tobytes(),  a1[1].tobytes()
(b'\x00\x00\x00\x00', b'\x00\x00\x00\x000\x00\x00\x00')

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions