Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
124 views

I have recently noticed that when I change the order of the observations in a sparse array, scikit-learn PCA with svd_solver="arpack" returns different floating point numbers. Is this an ...
Osman Merdan's user avatar
1 vote
2 answers
87 views

I'm learning TensorFlow to build machine learning models in Python. I tried following the official documentation on creating a simple classification model, but I couldn't clearly understand the tf....
Kaue Martins's user avatar
0 votes
0 answers
52 views

I am trying to follow Robert Bridson's Fluid Simulation Notes (https://www.cs.ubc.ca/~rbridson/fluidsimulation/fluids_notes.pdf) to implement my own eulerian fluid simulator for the first time. I was ...
Krrishkutta's user avatar
0 votes
1 answer
126 views

I am trying to express the structure of a sparse matrix (and the structure resulting from sparse matrix operations) at compile time with template parameters and constexpr functions. I've defined this ...
tpbarron's user avatar
2 votes
0 answers
185 views

I am using cuDSS to solve a set of Ax=b equations as follows cudssMatrixType_t mtype = CUDSS_MTYPE_SPD; cudssMatrixViewType_t mview = CUDSS_MVIEW_UPPER; cudssIndexBase_t base = CUDSS_BASE_ZERO; ...
pk68's user avatar
  • 83
2 votes
1 answer
111 views

I am trying to convert an Eigen Sparse Matrix of size NxN to CuSparse matrix so that I can use CUDA to solver the matrix Ax=B. Came across this thread which is pretty old (Convert Eigen::SparseMatrix ...
pk68's user avatar
  • 83
1 vote
1 answer
54 views

Let's say we have an ordered 1D tensor of ints/longs t. I want to produce a new tensor a with size max(t) where each term a[i] contains the first occurrence of the value i in the tensor t. We could ...
daqh's user avatar
  • 146
0 votes
1 answer
67 views

I want to do a "matrix-free eigenvalue evaluation" of a unitary matrix using ARPACK package. Unitary matrix comes from a sparse hermitian matrix, something that happens in many-body problem. ...
Erosannin's user avatar
  • 103
0 votes
1 answer
39 views

Background for purpose sparse/compressible data structure/compressible honeycumbs, vague description to give you an idea: This would allow an array of [0..255] connection points hopefully. If all of ...
oOo's user avatar
  • 301
3 votes
2 answers
105 views

When using sparse matrices, it's easy to find non-zero entries quickly (as these are the only elements stored). However, what's the best way to find the first ZERO entry? Using approaches like find(X==...
magnesium's user avatar
  • 639
1 vote
0 answers
134 views

I am trying to optimize the following part of my code that involves solving a semi-definite programming (SDP) in CVXPY. # optimization variables X and V V = cp.Variable((p,p)) X = cp.Variable((num,p))...
JayanthJ's user avatar
1 vote
0 answers
34 views

While the following works as expected: import torch from torch.nn import CrossEntropyLoss loss = CrossEntropyLoss() T1 = torch.randn(10, 20, 4, 4) # The BatchSize is a 10 times repeated tensor (1,20,...
MaKaNu's user avatar
  • 1,076
2 votes
1 answer
142 views

How do I solve a nonsymmetric eigenproblem. In terms of scipy.sparse.linalg.eigsh the matrix needs to be "real symmetric square matrix or complex Hermitian matrix A" (https://docs.scipy.org/...
SleepyGary's user avatar
1 vote
1 answer
51 views

I have the following Rcpp code #include <RcppArmadillo.h> #define _USE_MATH_DEFINES #include<cmath> #include <boost/math/special_functions/bessel.hpp> #include <mlpack.h> #...
noirritchandra's user avatar
1 vote
0 answers
48 views

At the moment I'm trying to build a COO using the CUSPARSE library. Looking at the documentation, and the function arguments, the way to create this is using the row and column indices followed by the ...
João Schmidt's user avatar
0 votes
1 answer
58 views

I have a dataframe in pandas that looks like this: >>> df[['BranchNumber', 'ModelArticleNumber', 'ActualSellingPrice']].info() <class 'pandas.core.frame.DataFrame'> Index: 447970 ...
Scott Deerwester's user avatar
0 votes
0 answers
44 views

This is my first time working with the MKL library. After referring to the official documentation, I obtained the latest version of the MKL library via the apt package manager in the WSL2 Ubuntu ...
hamster_watcher's user avatar
0 votes
1 answer
200 views

For the scipy functions csr_matrix, and csc_matrix, and specifically the forms that take the row and column indices: csr_matrix((data, (row_ind, col_ind)), [shape=(M, N)]) csc_matrix((data, (row_ind, ...
Michal Charemza's user avatar
1 vote
1 answer
59 views

I use some python and numpy/scipy code and produce a sparse array: <COOrdinate sparse array of dtype 'float64' with 21 stored elements and shape (403, 196)> Coords Values (206, 138) ...
Firestar-Reimu's user avatar
0 votes
0 answers
140 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
3 votes
0 answers
282 views

Below is the code which solves a sparse linear system: import cupyx import cupyx.scipy.sparse.linalg import time import scipy import scipy.sparse.linalg import pathlib file_dir = str(pathlib.Path(...
Andy's user avatar
  • 31
1 vote
1 answer
76 views

I can straight forwardly create the matrix C as (where the elements 0, A, B are 2X2 matrices) [ 0 A 0 0 0 0 ... 0 0 B 0 A 0 0 0 ... 0 0 0 B 0 A 0 0 ... 0 0 0 0 B 0 A 0 .... ...
jim's user avatar
  • 165
0 votes
2 answers
174 views

I am trying to compute in Python the following operation: (AB).C, where A,B,C are sparse matrices, and with the lower dot " ." I indicated the Hadamard (entry-wise) product of matrices, ...
Michele Mascherpa's user avatar
0 votes
0 answers
34 views

This is not a homework problem but for self-study. I am writing a program that reads in user input and transforms it into a sparse matrix (operator>>), adds two sparse matrices (operator+), and ...
benhpark's user avatar
0 votes
1 answer
115 views

I want to plot a path in a very large (e.g. 500K x 500K) 2D matrix. My current approach is creating an uint8 np array (for space-saving reasons, as I only have 4 possible values) and plotting it with ...
Quim's user avatar
  • 21

1
2 3 4 5
89