Skip to content

Unicode case-folding mismatch between Arkouda Strings and NumPy #5288

Open

Description

@ajpotts

Title

Unicode case-folding mismatch between Arkouda Strings and NumPy

Summary

Arkouda Strings case operations (lower, upper, title, capitalize) do not fully match
NumPy/Python Unicode semantics. In particular, certain non-ASCII characters (e.g. Greek Sigma)
are not case-folded as expected when compared against NumPy.

Example

>>> import arkouda as ak
>>> import numpy as np
>>> from arkouda import *

>>> data = np.array(["Σ"], dtype=object)
>>> ak.array(data).lower().to_ndarray()
array(['Σ'], dtype='<U1')

>>> np.char.lower(data.astype(str))
array(['σ'], dtype='<U1')

Expected Behavior

For parity with NumPy and Python string semantics, Unicode case-folding should match NumPy
(Σ → σ for lower, etc.).

Actual Behavior

Arkouda leaves certain Unicode characters unchanged, indicating ASCII-only or limited
Unicode handling in case operations.

Impact

  • NumPy alignment tests fail for Unicode inputs.
  • Pandas-style behavior may diverge from user expectations.

Workaround

Alignment tests now:

  • Strictly validate ASCII behavior
  • Mark Unicode case tests as xfail(strict=True) until full Unicode support is implemented

Proposed Resolution

Either:

  1. Implement full Unicode-aware case-folding in Arkouda Strings, or
  2. Explicitly document case operations as ASCII-only and retain xfail tests to track divergence.

Related Tests

  • tests/numpy/alignment_verification/strings_alignment.py

Activity

  1. added
    bug
    on Jan 9, 2026
  2. added a commit that references this issue on Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions