multiply#

bamengine.ops.multiply(a, b, out=None)[source]#

Multiply two arrays or array and scalar.

Parameters:
  • a (array) – First array.

  • b (array or float) – Second array or scalar.

  • out (array, optional) – Output array.

Returns:

Result of multiplication.

Return type:

array

Examples

>>> import bamengine.ops as ops
>>> prices = np.array([10.0, 20.0, 30.0])
>>> # Increase all prices by 10%
>>> new_prices = ops.multiply(prices, 1.1)
>>> # new_prices: [11.0, 22.0, 33.0]