Course Name: Python for Trading: Basic, Section No: 7, Unit No: 15, Unit type: Notebook
Logical operators
In [23]:
# This should be self explanatory by now
a = np.array([[True, True], [False, False]])
b = np.array([[True, False], [True, False]])
print(np.logical_or(a, b))
[[ True True] [ True False]]
In [24]:
print(np.logical_and(a, b))
[[ True False] [False False]] I don't understand these last Logical operators section. I've tried reading back what was explained in Other operators, that I totally understood but I don't get the Logical operators one. Can someone please explain?