numpy.char.isnumeric#

char.isnumeric(a)[source]#

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

Calls str.isnumeric element-wise.

Numeric characters include digit characters, and all characters that have the Unicode numeric value property, e.g. U+2155, VULGAR FRACTION ONE FIFTH.

Parameters:
aarray_like, unicode

Input array.

Returns:
outndarray, bool

Array of booleans of same shape as a.

See also

str.isnumeric

Examples

>>> np.char.isnumeric(['123', '123abc', '9.0', '1/4', 'VIII'])
array([ True, False, False, False, False])