I have a boolean array that looks like this:
arr_a = np.array(
[[False, False, False],
[True, True, True],
[True, True, True],
[False, False, False]]
)
and another array that looks like this:
arr_b = np.array(
[[100, 100, 100],
[200, 200, 200]]
)
I am looking for a function that I can call like this: np.boolean_combine(arr_a, arr_b), to return an array that will replace the 1's in arr_a with the values from arr_b, for an end result that looks like this:
np.array(
[[0, 0, 0]
[100, 100, 100],
[200, 200, 200],
[0, 0, 0]]
)
Is there such a function?
arra_b.sizealways equal the number ofTrueinarr_a?