About 6,350,000 results
Open links in new tab
  1. How do I multiply each element in a list by a number?

    Feb 3, 2016 · A blazingly faster approach is to do the multiplication in a vectorized manner instead of looping over the list. Numpy has already provided a very simply and handy way for this that …

  2. numpy.multiply() in Python - GeeksforGeeks

    Apr 17, 2025 · The numpy.multiply() is a numpy function in Python which is used to find element-wise multiplication of two arrays or scalar (single value). It returns the product of two input …

  3. numpy.multiply — NumPy v2.2 Manual

    numpy.multiply# numpy. multiply (x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True [, signature]) = <ufunc 'multiply'> # Multiply arguments …

  4. Python: Multiply Lists (6 Different Ways) - datagy

    Dec 12, 2021 · In this tutorial, you learned two different methods to multiply Python lists: multiplying lists by a number and multiplying lists element-wise. You learned how to simplify …

  5. How to Multiply in Python? [With Examples] - Python Guides

    Aug 8, 2024 · In this tutorial, I will show you how to multiply in Python using different methods with examples. I will also show you various methods to multiply numbers, lists, and even strings in …

  6. Multiply each element in a List by a Number in Python

    Apr 9, 2024 · Multiplying a NumPy array by a number effectively multiplies each element in the array by the specified number. Note that this only works with NumPy arrays. If you multiply a …

  7. Working with numpy.multiply() function (4 examples)

    Feb 25, 2024 · The numpy.multiply() function in Python’s NumPy library is a mathematical operation that performs element-wise multiplication on arrays. Its primary use is to multiply the …

  8. How to multiply the elements of an array by a number in python

    Jun 13, 2019 · To multiply the elements of an array by a number in python, a solution is to use the * operator, example: >>> import numpy as np >>> A = np.array([[1,2,0],[4,3,-1]]) >>> A array([[ …

  9. Array Operations - Problem Solving with Python

    NumPy array can be multiplied by each other using matrix multiplication. These matrix multiplication methods include element-wise multiplication, the dot product, and the cross …

  10. python - How to multiply individual elements of a list with a number

    If you use numpy.multiply. S = [22, 33, 45.6, 21.6, 51.8] P = 2.45 multiply(S, P) It gives you as a result. array([53.9 , 80.85, 111.72, 52.92, 126.91])

Refresh