Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
如何应用 ndimage.generic_filter()
我正在尝试学习 ndimage 但不知道如何通用过滤器 功能有效 文档提到用户函数将应用于用户定义的足迹 但不知何故我无法做到 这是示例 gt gt gt import numpy as np gt gt gt from scipy imp
python
scipy
带有蒙版和 RGB 图像的 Numpy/Scipy
我正在尝试使用skikit learn 为RGB 图像创建蒙版 我想创建一个仅选择等于 0 10 0 的像素的蒙版 即绿色通道上的 10 然后只显示那些像素 这应该是直接的 类似于http scikit image org docs dev
python
NumPy
scipy
pythonimaginglibrary
欠定系统的非负最小二乘
考虑以下问题 Find x 1 x 2 x 3 gt 0这样 67 5 60 x 1 90 x 2 120 x 3 60 30 x 1 120 x 2 90 x 3 有没有办法在Python中解这个方程 也许与scipy nnls 使用 s
python
NumPy
scipy
linearalgebra
用于查找对的压缩矩阵函数
对于一组观察结果 a1 a2 a3 a4 a5 他们的成对距离 d 0 a12 a13 a14 a15 a21 0 a23 a24 a25 a31 a32 0 a34 a35 a41 a42 a43 0 a45 a51 a52 a53 a5
python
Algorithm
Math
statistics
scipy
估计由一组点生成的图像面积(Alpha 形状??)
I have a set of points in an example ASCII file showing a 2D image I would like to estimate the total area that these po
python
scipy
ComputerVision
shapely
concavehull
如何为 binned_statistic 制作用户定义的函数
我正在使用 scipy stats 包沿轴进行统计 但我在使用百分位统计时遇到问题binned statistic 我概括了下面的代码 我尝试在一系列 x bin 中获取具有 x y 值的数据集的第 10 个百分位数 但它失败了 我当然可以
python
NumPy
statistics
scipy
python scipy.stats.powerlaw 负指数
我想为 scipy stats powerlaw 例程提供一个负指数 例如a 1 5 为了抽取随机样本 powerlaw pdf x a a x a 1 from scipy stats import powerlaw R powerlaw
python
statistics
scipy
idlprogramminglanguage
Python 和 Matlab 中的克罗内克积
我试图从 MATLAB 中用 Python 重现结果 但是 我似乎无法正确理解 这是正确的 MATLAB 代码 nx 5 ny 7 x linspace 0 1 nx dx x 2 x 1 y linspace 0 1 ny dy y 2
python
MATLAB
NumPy
scipy
将稀疏数组中的元素与矩阵中的行相乘
如果你有一个稀疏矩阵 X gt gt X csr matrix 0 2 0 2 0 2 0 1 gt gt print type X gt gt print X todense
python
matrix
NumPy
scipy
sparsematrix
有人有使用 scipy.stats.distributions 的示例代码吗?
我正在努力弄清楚如何使用 scipy distributions 包 并想知道是否有人可以为我发布一些示例代码 它似乎可以满足我需要的一切 我只是不知道如何使用它 我需要生成两种分布 一种是对数正态分布 一种是泊松分布 我知道每个的方差和
python
scipy
如何使用 scipy.optimize.least_squares 计算标准差误差
我将拟合与optimize curve fit和optimize least squares进行比较 使用 curve fit 我得到协方差矩阵 pcov 作为输出 我可以通过以下方式计算拟合变量的标准偏差误差 perr np sqrt n
python
scipy
leastsquares
函数矩阵、SymPy 和 SciPy 上的数值积分
从我的 SymPy 输出中 我得到了如下所示的矩阵 我必须将其积分为 2D 目前我正在按元素进行操作 如下所示 此方法有效 但速度太慢 对于sympy mpmath quad and scipy integrate dblquad 对于我的
python
scipy
sympy
symbolicmath
numericalintegration
Numpy 的特征值/向量不正确
我试图找到以下矩阵的特征值 向量 A np array 1 0 0 0 1 0 1 1 0 使用代码 from numpy import linalg as LA e vals e vecs LA eig A 我得到这个作为答案 print
python
matrix
scipy
eigenvalue
eigenvector
离散数据拟合:负二项式、泊松分布、几何分布
在 scipy 中 不支持使用数据拟合离散分布 我知道有很多关于这个的话题 例如 如果我有一个如下所示的数组 x 2 3 4 5 6 7 0 1 1 0 1 8 10 9 1 1 1 0 0 我无法申请这个数组 from scipy sta
python
scipy
statistics
distribution
使用 Python 读取文件并绘制 CDF
我需要读取带有时间戳 以秒为单位 的长文件 并使用 numpy 或 scipy 绘制 CDF 绘图 我确实尝试过使用 numpy 但似乎输出不是它应该的样子 下面的代码 任何建议表示赞赏 import numpy as np import
python
NumPy
matplotlib
scipy
cdf
在 Matlab 或 matplotlib 中根据法向量和点绘制平面
如何从法向量和点在 matlab 或 matplotlib 中绘制平面 对于所有的复制 粘贴 这里是使用 matplotlib 的 Python 类似代码 import numpy as np import matplotlib pyplo
MATLAB
matplotlib
plot
scipy
如何在python中使用Matlab的imresize
我正在转移Matlab的imresize代码写入Python 我找到了 scipy 的imresize 但我从 Matlab 得到了不同的结果 如何通过python得到与Matlab相同的结果 Python scipyimresize fr
python
image
MATLAB
imageprocessing
scipy
使用 scipy curve_fit 通过两个数据点拟合指数函数
我想拟合一个指数函数y x pw有一个常数pw拟合两个数据点 这scipy curve fit功能应该优化adj1 and adj2 我已尝试使用下面的代码 但无法使其工作 曲线不穿过数据点 我该如何修复它 import numpy as
python
scipy
curvefitting
Python / Scipy - 将optimize.curve_fit的sigma实现到optimize.leastsq中
我正在使用逻辑模型拟合数据点 由于有时我的数据存在 ydata 错误 因此我首先使用 curve fit 及其 sigma 参数在拟合中包含我个人的标准差 现在我切换到leastsq 因为我还需要一些curve fit无法提供的拟合优度估计
python
scipy
curvefitting
leastsquares
当 jac=False 时不使用雅可比行列式进行近似时,“牛顿 CG 方法需要雅可比行列式”?
我正在使用 scipy optimize minimize 进行优化 并尝试使用以下方法 Newton CG dogleg 和 trust ncg 据我了解 对于这些方法 需要目标函数的雅可比行列式 但是 那文档表明如果 jac 设置为 F
python
scipy
«
1 ...
47
48
49
50
51
52
53
...55
»