numpy.char.isdecimal#

char.isdecimal(a)[source]#

For each element, return True if there are only decimal characters in the element.

Calls str.isdecimal element-wise.

Decimal characters include digit characters, and all characters that can be used to form decimal-radix numbers, e.g. U+0660, ARABIC-INDIC DIGIT ZERO.

Parameters:
aarray_like, unicode

Input array.

Returns:
outndarray, bool

Array of booleans identical in shape to a.

See also

str.isdecimal

Examples

>>> np.char.isdecimal(['12345', '4.99', '123ABC', ''])
array([ True, False, False, False])