The char.isspace() function in Python returns True for each element of a string's input array if there are only whitespace characters in the given string and there is at least a character. Otherwise, it returns False.
char.isspace(a)
The char.isspace() function takes a single parameter value, a, which represents the input array of string.
The char.isspace() function returns an output array of Boolean values with the same shape as the input array a.
import numpy as np# creating different array objectsa = np.array([" ", 'Hi Dear', "Tiebreaker"])# implementing the char.isspace() functionmyarray = np.char.isspace(a)# printing the input arrayprint(a)# printing the output arrayprint(myarray)