About 62,100 results
Open links in new tab
  1. Most efficient way to multiply a small matrix with a scalar in numpy

    Apr 23, 2021 · In other words, multiplying matrix b with the scalar a[0]. I am looking for the most efficient way to compute this, since this operation is repeated millions of times.

  2. matrix - Scalar Multiplication in R - Stack Overflow

    Nov 23, 2014 · I'm trying to perform simple scalar multiplication in R, but I'm running into a bit of an issue. In linear algebra I would do the following: Here's how I've implemented this in R: A …

  3. Make the matrix multiplication operator - Stack Overflow

    Dec 29, 2016 · Scalar * matrix multiplication is a mathematically and algorithmically distinct operation from matrix @ matrix multiplication, and is already covered by the elementwise * …

  4. python - Matrix scalar multiplication - Stack Overflow

    Mar 3, 2015 · The mathematical equivalent of what you're describing is the operation of multiplication by a scalar for a vector. Thus, my suggestion would be to convert your list of …

  5. Product a scalar with a matrix in mathematica - Stack Overflow

    Feb 22, 2015 · I want to product a scalar with a matrix in mathematica. My codes are : w.P + (w^3).P P is a matrix and w is a scalar, but product gives scalar out of the matrix. Why?

  6. python - numpy matrix vector multiplication - Stack Overflow

    When I multiply two numpy arrays of sizes (n x n)* (n x 1), I get a matrix of size (n x n). Following normal matrix multiplication rules, an (n x 1) vector is expected, but I simply cannot find any …

  7. cvxpy objective function error involving MulExpression

    Dec 31, 2020 · warning: UserWarning: This use of ``*`` has resulted in matrix multiplication. Using ``*`` for matrix multiplication has been deprecated since CVXPY 1.1. Use ``*`` for matrix-scalar …

  8. Faster way to do element wise multiplication of matrices and scalar ...

    May 17, 2024 · the reason for the scalar multiplication being faster in your case is because it avoids matrix copying and also the overheads used by base R. this function does inplace …

  9. Sympy notation for matrix multiplication - Stack Overflow

    Apr 20, 2018 · Matrix product in SymPy is computed as a*b. The method dot in SymPy is meant to allow computing dot products of two matrices that represent vectors, for example: >>> …

  10. Got warning: warnings.warn(msg, UserWarning) - Stack Overflow

    Nov 19, 2022 · C:\Users\LENOVO\anaconda3\lib\site-packages\cvxpy\expressions\expression.py:593: UserWarning: This use of ``*`` has resulted in …