logical_and#
- bamengine.ops.logical_and(a, b)[source]#
Element-wise logical AND.
- Parameters:
a (
bool array) – First condition.b (
bool array) – Second condition.
- Returns:
Result of a AND b.
- Return type:
bool array
Examples
>>> import bamengine.ops as ops >>> inventory = np.array([10, 0, 5]) >>> price = np.array([120, 80, 110]) >>> avg_price = 100 >>> has_inventory = inventory > 0 >>> price_high = price > avg_price >>> can_sell = ops.logical_and(has_inventory, price_high)