numpy
Discrete Fourier Transform: How to use fftshift correctly with fft
I want numerically compute the FFT on a numpy array Y. For testing, I\'m using the Gaussian function Y = exp(-x^2). The (symbolic) Fourier Transform is Y\' = constant * exp(-k^2/4).[详细]
2023-04-12 08:36 分类:问答How can I quickly run a function over an array of every possible array of length L with given possible elements?
I have a function calc_dG that, for any array corresponding to a short DNA sequence (3 to 15 bases or so), gives me the binding energy of that sequence. Actually,开发者_C百科 it\'s just an array looku[详细]
2023-04-12 07:20 分类:问答Interpolate large irregular grid onto another irregular grid in Python
I am trying to interpolate complex values from one irregular grid to another irregular grid using Python. The grids are in 2D and there are 103,113 data points. I am using Python 2.6.6, Scipy 0.7.2, N[详细]
2023-04-12 05:46 分类:问答Creating greyscale video using Python, OpenCV, and numpy arrays
I am using 32-bit python with OpenCV 2.3.1.I am trying to write 2-dimensional numpy arrays to a opencv video writer.My code is similar to :[详细]
2023-04-12 05:08 分类:问答numpy.array of an "I;16" Image file
I want to use TIFF images to effectively save large arrays of measurement data. With setting them to mode=\"I;16\" (corresponding to my 16 bit data range), they yield 2MB files (~1000x1000 \"pi开发者_[详细]
2023-04-11 22:25 分类:问答How to force numpy array order to fortran style?
I am using quite a lot of fortran libraries to do some mathematical computation. So all the arrays in numpy need to be Fortran-contiguous.[详细]
2023-04-11 17:01 分类:问答Problems compiling with changes to f2py
I am trying to update my package scikits.bvp_solver (source here) and I have run into some problems with f2py generated files. The files \'bvp_solverf-f2pywrappers2.f90\' and \'bvp_solverfmodule.c\' w[详细]
2023-04-11 16:18 分类:问答python/numpy: how to get 2D array column length?
How do i get the length of the column in a nD ar开发者_高级运维ray? example, i have a nD array called a. when i print a.shape, it returns (1,21).[详细]
2023-04-11 16:12 分类:问答Efficient evaluation of a function at every cell of a NumPy array
Given a NumPy array A, what is the fastest/most effic开发者_运维知识库ient way to apply the same function, f, to every cell?[详细]
2023-04-11 13:12 分类:问答padding arrays using numpy
in my program i have a numpy array and do some convolution filtering on it. i am looking for some way to make array padding (and then unpad for output) easily using numpy to avoid boundary checking. i[详细]
2023-04-11 10:19 分类:问答