Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
73 views

I have recently been trying to use CUDA in Fortran for a project which requires finding the inverse of symmetric matrices. The matrices I am working with are not positive definite so I cannot use a ...
Ethan's user avatar
  • 11
0 votes
1 answer
77 views

I'm doing some prework for a control design of a system, and have started using SymPy. In my system I have a matrix A, with these parameters: s= symbols('s') V = 20000 #[m^3 volume in tank] K_qo = ...
pjoltergeist's user avatar
3 votes
2 answers
97 views

I have been trying to complete the 2nd assignment for the R Programming course from Coursera. This assignment consists of writing the function makeCacheMatrix() which returns the inverse of a matrix. ...
Marcos's user avatar
  • 41
1 vote
1 answer
88 views

With ⎕DIV←1, dividing by 0 does not give an error but gives a 0 every time. When dividing by 0, ⌹ (quad divide) seems to always throw a domain error even with ⎕DIV←1. Is there a reason why the value ...
sloorush's user avatar
  • 107
0 votes
0 answers
143 views

In Python have a large NxN sparse matrix representing the precision matrix Q (inverse covariance matrix) of a multivariate Gaussian distribution. I am interested in obtaining the marginal variances of ...
elling2000's user avatar
2 votes
1 answer
235 views

I am writing a maths library for a raytracer project, and so I'm trying to make my heavy operations (like matrix inverse) more optimised. After doing some research, I discovered this trick to invert a ...
Astranged T'fyer's user avatar
0 votes
1 answer
104 views

I want to calculate the (generalized) inverse of a 30807 x 30807 matrix. I tried to use np.linalg.pinv(matrix), and the error "MemoryError: Unable to allocate 7.07 GiB for an array with shape (...
Y H's user avatar
  • 17
-1 votes
1 answer
134 views

I am writing a program which requires me to find inverse of a complex 21*21 symmetric matrix several times(approx 35 million times).I initially do this with inv() from scipy.linalg. It works. Now I ...
Anonymous's user avatar
0 votes
2 answers
66 views

Here is my code: A = [+0.00, -2.34, -2.25, -2.16, -2.07, -1.98, -1.89, -1.80, -0.72, +0.09, +1.16; +2.34, +0.00, -3.15, -3.06, -2.97, -2.88, -2.79, -2.70, -1.26, -0.18, +0.98; +2.25, +3.15, +0.00, -3....
Joey Peluka's user avatar
0 votes
0 answers
136 views

I'm having trouble getting the correct output from numpy.array_equal. The identity array is created using np.eye(size), and the result_ab array I'm comparing it with was built with np.array([]). I ...
Marshmallow's user avatar
0 votes
1 answer
62 views

I am trying to invert a 10000x10000 sparse matrices that are tri-diagonal, but the problem I have is that scipy.sparse.linalg.inv() is too slow, so I have tried to use spsolve() instead. The main ...
THATS MY QUANT MY QUANTITATIVE's user avatar
1 vote
1 answer
83 views

I have to solve a linear system of equations with multiple right hand sides, A*X=B, where both, A and B are (upper) triangular, real, square matrices. The size is about 200 by 200. Is there a fast ...
C.Schroeder's user avatar
1 vote
0 answers
40 views

It is indicated that: "The routine CPXXbinvcol/CPXbinvcol computes the j-th column of the basis inverse." in the documentation on this link: https://www.ibm.com/docs/en/icos/22.1.1?topic=b-...
Botan Citil's user avatar
1 vote
1 answer
92 views

My python code is a lot slower than my matlab code. My python code is: import time from scipy import linalg import numpy as np N=1521 dt=0.1 thet=0.5 A0 = (np.linspace(1,N,N)).reshape(N,1) A0 = np....
Xerium's user avatar
  • 11
0 votes
1 answer
58 views

I am currently working on creating a version of Orthogonal Matching Pursuit (OMP) that can be performed simultaneously on different patches, utilizing the power of TensorFlow for optimization through ...
P.Carlino's user avatar
  • 679
2 votes
0 answers
185 views

To get the impedance profile for a circuit, I am using its admittance (G) and capacitance (C) matrices. I am using Python to compute impedance profile at different frequencies but the issue is that I ...
Dev's user avatar
  • 21
1 vote
1 answer
145 views

I am given two matrices (A and B), where the second has rows with unit length. For example in R: k <- 1000 m <- 10 n <- 100 A <- matrix(rnorm(m*k), m, k) # m x k B <- matrix(rnorm(k*n),...
Erik Wright's user avatar
0 votes
1 answer
217 views

In gaussian elimination, we take our matrix A and another matrix I. We proceed to convert the matrix A into an identity matrix. Once that's done, we apply the same steps that we did on A on the ...
desert_ranger's user avatar
0 votes
0 answers
97 views

I have the following Matlab code (my production code array size is of order of 8766 x 8766): % Define z1 and z2 z1 = rand(6, 6); % Random 6x6 matrix - real life size 8766 x 8766 z2 = rand(6, 7); % ...
Zanam's user avatar
  • 4,847
2 votes
1 answer
413 views

I'm new to Haskell. As a part of an academic course, I was requested to implement a function in Haskell that calculates the determinant, rank and inverse matrix of a given matrix. I use gaussian ...
Menish's user avatar
  • 21
0 votes
0 answers
291 views

I want to find the inverse of an n-order matrix using the method of finding the adjugate matrix and determinant, and then deducing the inverse. I'm using C++ language, and for calculating the ...
陳逸軒's user avatar
1 vote
2 answers
224 views

I want to apply the cupy.linalg.pinv function to 100k arrays, but I see a drop in performance compared to the Numpy equivalent. My 100k arrays are two dimensions arrays. The main array shape is: (...
Begoodpy's user avatar
  • 1,094
1 vote
1 answer
229 views

I'm trying to use the LAPACK package to compute the inverse of a matrix. For this end, I've employed the routines sgetrf and sgetri. However, when testing the code, it doesn't return the expected ...
Leo's user avatar
  • 15
1 vote
0 answers
454 views

I want to inverse a 401x401 (upper triangular square) matrix in python but run into issues when the matrix size exceeds 153x153. For all sizes below this, everything works like a charm but then the ...
Jep's user avatar
  • 59
1 vote
1 answer
1k views

I have a stable, simple Gauss-Jordan algorithm for calculating the matrix inversion on the CPU. I tried to transfer this algorithm to the GPU, it works fine, but the speed has dropped significantly, ...
Gagy Krayper's user avatar
0 votes
0 answers
83 views

For a matrix A, when using numpy version 1.16.4 to run numpy.linalg.inv(A.T.dot(A)) will result in: numpy.linalg.LinAlgError: Singular matrix. When using numpy version 1.21.6, no error raised. So I ...
Jace Yang's user avatar
0 votes
0 answers
35 views

I am trying to plot a 3D surface using matplotlib's plot_surface function. My f(x, y) function is complicated. I'm using inverse matrix which causes an error "Last 2 dimensions of the array must ...
Luna Lovegood's user avatar
1 vote
0 answers
338 views

I am writing a tutorial, as part of which I wanted to show some of the issues that occur when analyzing data that has a singular covariance matrix. I came across some odd behavior in numpy. The ...
Harry Matthews's user avatar
0 votes
0 answers
128 views

There's a related questions Matrix inverse with Decimal type NumPy 2015 a while ago which did not have a definite answer. There's a second question from me Is there a way for python to perform a ...
ShoutOutAndCalculate's user avatar
-1 votes
1 answer
383 views

I've made a function to calculate the inverse of a matrix, but I'm having an issue getting the correct result when I run my program. For example, when I insert the following matrix: A1 A2 A3 (2 1 ...
Ahmed Kahil's user avatar
0 votes
2 answers
289 views

In my code, each runtime takes about 40sec, and most of the time (38sec) is spent matrix inversion, i.e., numpy.linalg.inv. Here, the matrix dimension generally is 100-1000. Thus, I want to reduce the ...
Young Q's user avatar
  • 31
-2 votes
1 answer
564 views

There seem to be a ton of questions about inverse functions, but they're not what I'm after (neither are many of the results in the matrix-inverse tag). I'm trying to use a function that gets the ...
Shawn Hemelstrand's user avatar
0 votes
1 answer
1k views

Here is a small example. It surprised me at how slow it is. import numpy as np import sympy as sp X = np.empty(shape=(10,3), dtype=object) for i in range(10): for j in range(3): X[i,j] = ...
Galen's user avatar
  • 1,394
0 votes
0 answers
45 views

I have two arrays A and B. I am trying to solve for X in AX=B. I am using scipy.sparse.linalg.cg and np.linalg.pinv. Both present different outputs which I have shown below. From physics, I know that ...
rajunarlikar123's user avatar
0 votes
2 answers
209 views

I am trying to apply the loop unrolling to find the inverse of a matrix by the Gauss Jorda method, to reduce the number of memory accesses (bottleneck) when the size of the matrices is very large and ...
subject25's user avatar
0 votes
0 answers
45 views

This code creats a matrix B contains the product of the each line of A by the backslash inverse of a aline of x A = [1,2,3,8,1;10,45,7,3,1;9,8,15,75,65,]; x = [14,5,11,15,33;7,1,9,1,1;87,45,11,0,65]; ...
Nekkache Abdesslem's user avatar
3 votes
1 answer
285 views

I have an iterative problem where at each iteration I need to perform a series of matrix operations, which I want to speed up. The majority of the calculation involves constant variables, except for a ...
Andrea's user avatar
  • 31
0 votes
0 answers
72 views

I have recently started coding and was trying to write a program to find the inverse of a matrix using Gauss Jordan method. I try to transform the given matrix to an identity matrix by using ro ...
Lakshita's user avatar
1 vote
1 answer
569 views

I have a transformation matrix of type Eigen::Matrix4d. And I would like to get its inverse. I write a function my self to compute it by the following formular. . And here is my code: Eigen::Matrix4d ...
KillerBee's user avatar
0 votes
1 answer
132 views

as far as i known, the matrix's inverse is a common operator. while tf.raw_ops.MatrixInverse is not supported in tflite and BatchMatrixInverse is not available in GraphDef version 1205. How can i ...
jiaocha's user avatar
  • 21
0 votes
1 answer
3k views

I'm currently working with a least-square algorithm on Python, regarding some geodetic calculations. I chose Python (which is not the fastest) and it works pretty well. However, in my code, I have ...
Matteo Casto's user avatar
-1 votes
1 answer
1k views

I am Implementing a Inverse Matrix by using the following formula Inverse of A = (Adj of A) / (Determinant of A) I am implementing Adjoint Matrix, But When I printing the result of adjoint function , ...
John Mike's user avatar
0 votes
0 answers
77 views

I´m developing a code to analyse portal frames with the finite element method. However I´m encountering a problem, when I try to multiply the inverse of specic positions of a matrix with an array, ...
amotoli's user avatar
  • 39
0 votes
0 answers
195 views

Is it possible to get the inverse of an LP basis the model is solved? For example, I can get the names of the variables that are in the basis with the following code. I am looking for something ...
Botan Citil's user avatar
1 vote
2 answers
503 views

Is it possible to calculate the inverse of a matrix in CODEYS? I am trying to write the code for the following equation.
Nehal Trivedi's user avatar
-1 votes
1 answer
62 views

I have this dataframe that I would like to flip M1 M2 M3 John 0.10 0.74 0.25 Alex 0.80 0.15 0.05 I would like to convert it to this format: M ...
Michelle Espinosa's user avatar
2 votes
1 answer
200 views

I'm solving a PDE using an implicit scheme, which I can divide into two matrices at every time step, that are then connected by a boundary condition (also at every time step). I'm trying to speed up ...
lhcgeneva's user avatar
  • 1,981
0 votes
1 answer
1k views

I am looking to invert a (lower) triangular matrix that comes from the Cholesky decomposition of A, as A = L @ L.T. There are a few potential solutions, including numpy: inverting an upper triangular ...
user avatar
0 votes
0 answers
295 views

I have a matrix (A) of order 8*8 which contains complex numbers. I would like to calculate the inverse of that matrix, so I used np.linalg.inv(b) command but I got an error: UFuncTypeError: Cannot ...
Amin Azimi's user avatar
0 votes
0 answers
685 views

I am somewhat new to programming in fortran and I have been doing small activities, one of them is a subroutine to solve a system of equations with the Gauss Jordan Method: PROGRAM Program2 ...
Ixe Sánchez Ibarra's user avatar

1
2 3 4 5
11