import numpy as np
import math
from math import *
def h_scalar(x):
return (1 / sqrt(2 * pi)) * exp(-.50** x ** 2.00)
import numpy as np
# array
a = np.array(["a b c", "d e f", "h i j"])
# function
replace_space = np.vectorize(lambda x: x.replace(" ", "_"))
# response
print(replace_space(a))
# will return: ['a_b_c' 'd_e_f' 'h_i_j']