subtract#
- bamengine.ops.subtract(a, b, out=None)[source]#
Subtract two arrays or array and scalar.
- Parameters:
- Returns:
Result of subtraction (a - b).
- Return type:
Examples
>>> import bamengine.ops as ops >>> inventory = np.array([10.0, 5.0, 0.0]) >>> sold = np.array([2.0, 3.0, 0.0]) >>> remaining = ops.subtract(inventory, sold) >>> # remaining: [8.0, 2.0, 0.0]