I have an array called A:
A = np.array([[-1, 2, -3],
[4, -5, 6],
[-7, 8, -9]])
Now I want to extract positive and negative parts and save them in two new arrays like:
B = np.array([[0, 2, 0],
[4, 0, 6],
[0, 8, 0]])
for positive parts and
C = np.array([[-1, 0, -3],
[0, -5, 0],
[-7, 0, -9]])
for negative parts.
Could you please guide me how to get arrays B and C from array A in Python 3.6?