Unexpected behavior when using np.where with multiple conditions in NumPy 1.24
I'm updating my dependencies and I've been struggling with this for a few days now and could really use some help. I'm working with a 2D NumPy array and trying to apply multiple conditions using `np.where`. However, I'm seeing unexpected results when the conditions are not mutually exclusive. For instance, I'm using the following code: ```python import numpy as np # Sample 2D array array = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) # Applying multiple conditions condition1 = array > 3 condition2 = array < 8 result = np.where(condition1 & condition2, 'In Range', 'Out of Range') print(result) ``` I expect `result` to reflect the values that are both greater than 3 and less than 8. However, the output I receive is: ``` [['Out of Range' 'Out of Range' 'Out of Range'] ['In Range' 'In Range' 'In Range'] ['In Range' 'Out of Range' 'Out of Range']] ``` It seems like it should be evaluating each condition correctly, but I am not getting the expected behavior. I've verified that the array dimensions are compatible with the conditions I'm applying. I tried breaking the conditions down into separate `np.where` statements, but that didn't work out as expected either. As a side note, I'm currently using NumPy version 1.24.0. Is there something I'm missing in how I'm combining these conditions? Any insights would be greatly appreciated! I'm working on a API that needs to handle this. I'd really appreciate any guidance on this. My team is using Python for this CLI tool. Any help would be greatly appreciated!