Skip to main content

isnumeric

Function isnumeric 

Source
pub fn isnumeric<D: Dimension>(
    a: &StringArray<D>,
) -> FerrayResult<Array<bool, D>>
Expand description

Return true where every character is numeric and the string is non-empty. Matches numpy.strings.isnumeric, which delegates per element to CPython’s str.isnumeric() (Unicode Numeric_Type = Decimal, Digit, or Numeric): superscripts/fractions like ² and ½, roman numerals like , and ideographic numerals like are numeric, while ., +, and - are not. Backed by the 15.1.0-locked [NUMERIC_TYPE_RANGES] table via [is_numeric_char], NOT Rust’s char::is_numeric (which tests the Nd|Nl|No categories against a newer Unicode revision: it misses the Lo ideographic numerals and wrongly accepts codepoints assigned after Unicode 15.1.0).