# Tag Info

60

Except for code which does a significant number of floating-point operations on data that are held in cache, most floating-point intensive code is performance limited by memory bandwidth and cache capacity rather than by flops. $v$ and the products $Av$ and $Bv$ are all vectors of length 2000 (16K bytes in double precision), which will easily fit into a ...

19

Your code is limited by memory bandwidth. For trivial math, it's often better to count memory accesses rather than flops. You'll get the following table: operation memory reads/writes matrix + matrix 3n² matrix * vector 2n²+n (if vector is not cached) matrix * vector n²+2n (if vector is only read once) vector + vector ...

6

I don't think there is a way to display the used LAPACK function names natively during runtime using the interfaces provided by scipy.linalg. Depending on your goals you can: read the source code and deduce the logic from there. Unfortunately, this is not a runtime-use scenario, but a human analysis. fork your own version of scipy, add custom outputs (to ...

4

I think you already know the answer- find the inverse of each of the small diagonal blocks. The details of how you might break the matrix up into the block in Python are something out of scope for this stackexchange group. As others have suggested you most likely don't really need the inverse of this matrix and could probably do everything you need with a ...

4

You might want to use the fact that: $$||A||_2=\sigma_\max(A)$$ where $\sigma_\max$ is the largest singular value. If you are interested in details, this Math SO question should be interesting. Thus, $$||A^{-1}||_2=\frac{1}{\sigma_\min(A)}$$ where $\sigma_\min$ is the smallest singular value. You certainly want to avoid the actual calculation of the ...

2

As I mentioned in my comment, due to that you are searching for a method based on Python and ideally available in NumPy or SciPy, my suggestion is to use scipy.linalg.expm. It's really easy to use basically you have the $X$ matrix and you just pass it to the scipy.linalg.expm class and it would give you the exponential of $X$ (i.e. $e^{X}$). Due to that you ...

Only top voted, non community-wiki answers of a minimum length are eligible
{"ft_lang_label":"__label__en","ft_lang_prob":0.897168,"math_prob":0.9398012,"size":3321,"snap":"2019-51-2020-05","text_gpt3_token_len":909,"char_repetition_ratio":0.10792885,"word_repetition_ratio":0.03949731,"special_character_ratio":0.28696176,"punctuation_ratio":0.10015649,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9957373,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-27T19:41:51Z\",\"WARC-Record-ID\":\"<urn:uuid:7dc4a417-2180-4bca-a613-38c05a6422d7>\",\"Content-Length\":\"98771\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:54868d35-b5b9-4450-9e18-acdc52411c07>\",\"WARC-Concurrent-To\":\"<urn:uuid:4d65241b-dae8-466c-9722-5285809aae45>\",\"WARC-IP-Address\":\"151.101.65.69\",\"WARC-Target-URI\":\"https://scicomp.stackexchange.com/tags/matrix/hot?filter=month\",\"WARC-Payload-Digest\":\"sha1:K45Q4Q6YAZLRRJZNJRFV6DFAC3RXBBRD\",\"WARC-Block-Digest\":\"sha1:PFOPRACYKASHXPBGHFAHIATQS6VQQKO3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579251705142.94_warc_CC-MAIN-20200127174507-20200127204507-00364.warc.gz\"}"}