Skip to content
Advertisement

Tag: scipy

Reflecting 4d symmetric data

I’ve found out that there is no example of how to reflect symmetric 4d data, which can be very useful when 3d simulations wants to be performed using a symmetric plane to reduce calculations(e.g. ANSYS, COMSOL, etc). This example shows a data file structure corresponding to a COMSOL simulation, which has the structure: X, Y, Z, Amplitude The model had

Python scipy.io write a mat file of n by 1

I need to save a .mat file from python. The mat file should be a cell array of n by 1. The code below does what I need except the output mat file is 1 by n. How do I generate the desired n by 1 file? Answer Just do a list of lists.

Conformal plotting python

I’m working on the joukowsky transformation for plotting airfoils and I’m trying to do so with python. The conformal mapping should be pretty straight forward but can’t seem to find a guide on how to approach the problem on python. by the math: According to the theory, by plotting z i should get a circle on that plane and by

How to use values of find_peak function Python

I have to analyse a PPG signal. I found something to find the peaks but I can’t use the values of the heights. They are stored in like a dictionary array or something and I don’t know how to extract the values out of it. I tried using dict.values() but that didn’t work. The PPG signal looks like this. To

Python – Differential equation solver for time-dependent coefficients gives different dynamics for different time offsets

I am solving the dynamics of a system when it interacts with a pulse, which basically is solving a time-dependent differential equation. In general it works fine, but whenever I take the bandwidth of the pulse small, i.e. around unity, the solver depends on where the pulse starts t0. Let me give you the code and some pictures and then

Fastest way for computing pseudoinverse (pinv) in Python

I have a a loop in which I’m calculating several pseudoinverses of rather large, non-sparse matrices (eg. 20000×800). As my code spends most time on the pinv, I was trying to find a way to speed up the computation. I’m already using multiprocessing (joblib/loky) to run with several processes, but that of course increases also overhead. Using jit did not

Cupy says it has scipy’s cg implemented, but cannot find cg(conjugate gradient method) when installed

I am unable to find this https://docs.cupy.dev/en/latest/reference/generated/cupyx.scipy.sparse.linalg.cg.html#cupyx.scipy.sparse.linalg.cg after the installation of cupy. It says module not found Can anyone help me? I don’t know what’s wrong, but I have installed cupy via pip, and this library was supposed to be there, but its not present. Answer The module is available in CuPy v9 betas. (The v: latest docs are generated

Advertisement