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)