Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7895437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:38:37+00:00 2026-06-03T07:38:37+00:00

I am using Numpy/Scipy to invert a 20k matrix, it’s slow. I tried: (1)

  • 0

I am using Numpy/Scipy to invert a 20k matrix, it’s slow.
I tried:

(1) M_inv = M.I

(2) Ident = np.Identity(len(M))
    M_inv = scipy.linalg.solve(M, Ident)

(3) M_inv = scipy.linglg.inv(M)

but didn’t see any speedup.

Is there any other way to speed this up?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T07:38:38+00:00Added an answer on June 3, 2026 at 7:38 am

    This is a big matrix, and inverting it is going to be slow. Some options:

    • Use a numpy linked against Intel MKL (e.g. the Enthought distribution, or you can compile it yourself), which should be faster than one linked against standard BLAS/ATLAS.
    • If your matrix is sufficiently sparse, use scipy.linalg.sparse. (This will probably be slower if there are only a few zeros, though.)
    • Figure out if you really need an explicit representation of the inverted matrix to do whatever it is you’re trying to do with it – often you can get away without explicitly inverting it, but it’s hard to tell without knowing what it is you’re doing with this matrix.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone tried compiling SciPy 0.7.1 on Windows using numpy-1.3.0 that was built with
I have a program in python using numpy and scipy. adding cython in it
Using NumPy , a matrix A has n rows and m columns, and I
How can I run hierarchical clustering on a correlation matrix in scipy / numpy
Problem I would like to compute the following using numpy or scipy: Y =
I am using scipy's gmean() function to determine the geometric mean of a numpy
I am working on doing some digital filter work using Python and Numpy/Scipy. I'm
What does the following error: Warning: overflow encountered in exp in scipy/numpy using Python
I want to create a .wav file in Python using the numpy and scipy
i'm using python + numpy + scipy to do some convolution filtering over a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.