[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-390027-105":59,"doc-detail-390027-en":130},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","python-for-data-science-cheat-sheet-scipy-linear-algebra-390027","Python For Data Science Cheat Sheet - SciPy-Linear Algebra","","Python For Data Science Cheat Sheet provides a compact, practical reference for scientific computing workflows. It covers key NumPy concepts such as array construction, index tricks, shape manipulation, polynomials, vectorization, and type handling, along with additional utility functions like angle, linspace, unwrap, logspace, selection, and factorial-like helpers. It then summarizes SciPy linear algebra topics including matrix creation, inverse/norm/rank/determinant, solving dense and sparse linear systems, sparse matrix formats, sparse exponential, and common matrix functions and decompositions.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/python-for-data-science-cheat-sheet-scipy-linear-algebra-390027/390027/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/python-for-data-science-cheat-sheet-scipy-linear-algebra-390027/390027.png","ImageObject",300,407,{"name":92,"@type":93},"Olivia Brown","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-10-17","2026-09-25",true,{"@type":102,"interactionType":103,"userInteractionCount":52},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What does the cheat sheet cover for NumPy?","Question",{"text":112,"@type":113},"It summarizes NumPy array creation, index tricks, shape manipulation (transpose, flatten, stacking, splitting), polynomials, vectorizing functions, type handling (real/imag), and several other utility functions like angle, linspace/logspace, unwrap, select, and combinatorial helpers.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"Which SciPy modules are mentioned for linear algebra?",{"text":117,"@type":113},"It highlights using SciPy's linalg and sparse modules, noting that scipy.linalg expands on NumPy's numpy.linalg and that sparse provides sparse-specific matrix operations.",{"name":119,"@type":110,"acceptedAnswer":120},"How does the cheat sheet approach solving linear problems?",{"text":121,"@type":113},"For dense matrices it references routines such as linalg.solve and linalg.lstsq, while for sparse matrices it points to sparse.linalg.spsolve along with related sparse inverse/norm operations.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},390027,1790436667,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":52,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":144,"read_time":36},16904993612988,"https://ap-avatar.wpscdn.com/davatar_a8503ba1806abce46bf441b54a3ca4cd","Python For Data Science Cheat Sheet  \nSciPy-Linear Algebra  \nLearn More Python for Data Science [Interactively](Interactively at www.datacamp.com)[ at ](Interactively at www.datacamp.com)[www.datacamp.com](Interactively at www.datacamp.com)  \nSciPy  \nThe SciPy library is one of the core packages for scientific computing that provides mathematical algorithms and convenience functions built on the NumPy extension of Python.  \nInteracting With NumPy  Also see NumPy   \n>>> import numpy as np >>> a = np .array([1,2,3])  \n>>> b = np .array([(1+5j,2j,3j), (4j,5j,6j)])  \n>>> c = np .array([[(1 .5,2,3), (4,5,6)], [(3,2,1), (4,5,6)]])  \nIndex Tricks  \n\n| >>> np.mgrid[0:5,0:5]\u003Cbr>>>> np .ogrid[0:2,0:2]>>> np .r_ [[3,[0]*5,-1:1:10j]>>> np .c_ [b,c] | Create a dense meshgrid Create an open meshgrid Stack arrays vertically (row-wise)\u003Cbr>Create stacked column-wise arrays |\n| --- | --- |\n\nShape Manipulation  \n\n| >>> np .transpose(b)\u003Cbr>>>> b .flatten()\u003Cbr>>>> np.hstack((b,c))\u003Cbr>>>> np.vstack((a,b))\u003Cbr>>>> np.hsplit(c,2)\u003Cbr>>>> np.vpslit(d,2) | Permute array dimensions\u003Cbr>Flatten the array\u003Cbr>Stack arrays horizontally (column-wise) Stack arrays vertically (row-wise)\u003Cbr>Split the array horizontally at the 2nd index Split the array vertically at the 2nd index |\n| --- | --- |\n\nPolynomials  \n\n| >>> from numpy import poly1d >>> p = poly1d([3,4,5]) | Create a polynomial object |\n| --- | --- |\n\nVectorizing Functions  \n\n| >>> def myfunc(a):\u003Cbr>if a \u003C 0:\u003Cbr>return a*2\u003Cbr>else:\u003Cbr>return a/2\u003Cbr>>>> np.vectorize(myfunc) | Vectorize functions |\n| --- | --- |\n\nType Handling  \n\n| >>> np .real(c)\u003Cbr>>>> np .imag(c)\u003Cbr>>>> np .real_if_close(c,tol=1000)\u003Cbr>>>> np .cast[ 'f' ](np.pi) | Return the real part of the array elements\u003Cbr>Return the imaginary part of the array elements Return a real array if complex parts close to 0 Cast object to a data type |\n| --- | --- |\n\nOther Useful Functions  \n\n| >>> np .angle(b,deg=True )\u003Cbr>>>> g = np.linspace(0,np.pi,num=5)>>> g [3:] += np.pi >>> np.unwrap(g)\u003Cbr>>>> np .logspace(0,10,3)\u003Cbr>>>> [np.select](np.select) ([c\u003C4],[c*2])\u003Cbr>>>> misc .factorial(a)\u003Cbr>>>> misc .comb(10,3,exact=True )>>> misc.central_diff_weights(3)>>> misc.derivative(myfunc,1.0) | Return the angle of the complex argument Create an array of evenly spaced values (number of samples)\u003Cbr>Unwrap\u003Cbr>Create an array of evenly spaced values (log scale) Return values from a list of arrays depending on conditions\u003Cbr>Factorial\u003Cbr>Combine N things taken at k time\u003Cbr>Weights for Np-point central derivative Find the n-th derivative of a function at a point |\n| --- | --- |\n\nLinear Algebra  Also see NumPy    \nYou’ll use the linalg and sparse modules. Note that scipy .linalg contains and expands on numpy .linalg.  \n>>> from scipy import linalg, sparse  \nCreating Matrices  \n>>> A = np .matrix(np .random .random((2,2)))>>> B = np .asmatrix(b)  \n>>> C = np .mat(np .random .random((10,5)))>>> D = np .mat([[3,4], [5,6]])  \nBasic Matrix Routines  \n\n| Inverse\u003Cbr>>>> A .I\u003Cbr>>>> linalg .inv(A)\u003Cbr>>>> A .T\u003Cbr>>>> A .H\u003Cbr>>>> np .trace(A)\u003Cbr>Norm\u003Cbr>>>> linalg.norm(A)\u003Cbr>>>> linalg.norm(A,1)\u003Cbr>>>> linalg .norm(A,np .inf)\u003Cbr>Rank\u003Cbr>>>> np .linalg .matrix_rank(C)\u003Cbr>Determinant\u003Cbr>>>> linalg.det(A)\u003Cbr>Solving linear problems\u003Cbr>>>> linalg .solve(A,b)>>> E = np.mat(a) .T >>> linalg .lstsq(D,E)\u003Cbr>Generalized inverse\u003Cbr>>>> linalg.pinv(C)\u003Cbr>>>> linalg.pinv2(C) | Inverse\u003Cbr>Inverse\u003Cbr>Tranpose matrix Conjugate transposition Trace\u003Cbr>Frobenius norm\u003Cbr>L1 norm (max column sum)\u003Cbr>L inf norm (max row sum)\u003Cbr>Matrix rank Determinant\u003Cbr>Solver for dense matrices\u003Cbr>Solver for dense matrices\u003Cbr>Least-squares solution to linear matrix equation\u003Cbr>Compute the pseudo-inverse of a matrix (least-squares solver)\u003Cbr>Compute the pseudo-inverse of a matrix (SVD) |\n| --- | --- |\n\nCreating Sparse Matrices  \n\n| >>> F = np .eye(3, k=1)\u003Cbr>>>> G = np .mat(np .identity(2))>>> C[C > 0 .5] = 0\u003Cbr>>>> H = sparse .csr_matrix(C)>>> [I = sparse.csc_matrix](I = sparse.csc_matrix) (D)>>> J = sparse .dok_matri","cbCaibx7ItR6ph5V","https://ap.wps.com/l/cbCaibx7ItR6ph5V","pdf",6838320,16,"English","# Python For Data Science Cheat Sheet\n## SciPy-Linear Algebra\n## NumPy Basics\n## Shape Manipulation\n## Polynomials\n## Vectorizing Functions\n## Type Handling\n## Other Useful Functions\n## Linear Algebra\n## Creating Matrices\n## Basic Matrix Routines\n## Creating Sparse Matrices\n## Sparse Matrix Routines\n## Sparse Matrix Functions\n## Matrix Functions\n## Decompositions","[{\"question\":\"What does the cheat sheet cover for NumPy?\",\"answer\":\"It summarizes NumPy array creation, index tricks, shape manipulation (transpose, flatten, stacking, splitting), polynomials, vectorizing functions, type handling (real/imag), and several other utility functions like angle, linspace/logspace, unwrap, select, and combinatorial helpers.\"},{\"question\":\"Which SciPy modules are mentioned for linear algebra?\",\"answer\":\"It highlights using SciPy's linalg and sparse modules, noting that scipy.linalg expands on NumPy's numpy.linalg and that sparse provides sparse-specific matrix operations.\"},{\"question\":\"How does the cheat sheet approach solving linear problems?\",\"answer\":\"For dense matrices it references routines such as linalg.solve and linalg.lstsq, while for sparse matrices it points to sparse.linalg.spsolve along with related sparse inverse/norm operations.\"}]","Python For Data Science Cheat Sheet - SciPy-Linear Algebra | PDF",1790329256]