Questions tagged [scipy-spatial]

103 questions
0
votes
1 answer

Management of scipy.spatial.distance.cdist output

Good morning everyone, if I am writing something in a wrong way please let me know. However I am using the afore mentioned method in python to get pairwise CA-CA distances of two sets of residues in a pdb file, sometimes there are two CA due to…
Filippo
  • 3
  • 2
0
votes
1 answer

Which algrorithm and mathematical logic is used behind scipy.spatial.KDTree(curve)

I am finding the shortest distance to the point using this #find the nearest point and shortest distance curve=np.column_stack((curve_mrds,curve_nrds)) # <-- the coordinates of the curve point = points_2 # <-- the point to find #The distance of…
ATS
  • 11
  • 2
0
votes
1 answer

How to find code source of scipy.special.rel_entr function?

I am trying to look for the code source of scipy.special.rel_entr function in GitHub Repo but could not find rel_entr function definition. I also tried to look in this code: https://github.com/scipy/scipy/pull/6522/files#diff-0
Joe
  • 575
  • 6
  • 24
0
votes
1 answer

Compostion of rotation matrix and its inverse

I am using scipy.spatial transform library. When i compose rotation matrix in xyz manner for angle [45, 45,45 ] then why inverse [-45,-45,-45] is correct when i select "zyx". and why it's wrong when I select "xyz". Am i doing anything wrong? or my…
Aviator
  • 421
  • 1
  • 8
  • 15
0
votes
1 answer

Convert simplices from Delaunay Triangulation to networkx graph

This is a follow-up to the post here. I am trying to convert the simplices returned from Scipy's Delaunay Triangulation to a Networkx graph. Code: from scipy.spatial import Delaunay as scipy_Delaunay # tri = scipy_Delaunay(pts[:, 0:2]) #input…
Natasha
  • 1,111
  • 5
  • 28
  • 66
0
votes
1 answer

Voronoi Diagram Explanation

I am trying to generate Voronoi split polygons and not able to understand the parameter 'furthest_site=True' in Voronoi's Scipy's implementation. from scipy.spatial import Voronoi, voronoi_plot_2d points = np.array([[0, 0], [0, 1], [0, 2], [1, 0],…
sandeepsign
  • 539
  • 6
  • 11
0
votes
3 answers

How to compute similarities between arrays?

I am trying to compute similarity between two samples. The python functions sklearn.metrics.pairwise.cosine_similarity and scipy.spatial.distance.cosine return results that I am not satisfied with. For example: In the following I would have…
Kyv
  • 615
  • 6
  • 26
0
votes
0 answers

Python-SciPy Voronoi diagram accuracy

I was using SciPy-Voronoi diagrams to generate some figures, and my professor and I observed something interesting. The line connecting any two sites (input points) should be a perpendicular bisector from the mathematical definition. However, in the…
0
votes
1 answer

Simulation of random points on a multivariate convex hull with scipy

I have a data with 10 000 rows and 10 columns. The first goal of my study is to calculate the "Convex Hull" on this data. The package "scipy" can do this easily and I can get the vertices, the parameters of the different hyperplanes such as : b0 +…
AdrienC
  • 59
  • 3
0
votes
1 answer

Discrete Laplacian on a non-regular mesh (python)

I have coded the laplacien function for a non-regular mesh (created with the scipy.spatial.Delaunay function). I have not errors but the results are not correct : the eigenvectors are correct but the eigenvalues ​​are too high (in absolute…
bosonic
  • 21
  • 4
0
votes
1 answer

Get all feasible solutions with SCIP

How do I get all feasible solutions with scip? I already know something through the web "https://www.scipopt.org/doc/html/COUNTER.php". But I've learned that I only get the solutions by detected. I can't get all solutions if the feasible solutions…
0
votes
1 answer

How to interpolate spatial data from irregular grid to regular grid using the max of the k-nearest neighbours?

I am having a problem struggeling me for a few days now. : There are 17 numpy arrays with values and corresponding latitude and longitude coordinates. Each of the them contains 360*600 points. These points are overlappping at some parts. What I want…
dl.meteo
  • 1,658
  • 15
  • 25
0
votes
1 answer

Constructing convex hull object with known triangular faces

TLDR: I need to construct a python object for fast interior point testing, similar to a SciPy ConvexHull or DelaunayTriangulation. The catch is that I know ahead of time the order in which the triangulation of the points must be constructed: (6…
T Kirk
  • 1
  • 1
0
votes
1 answer

Segmentation fault: 11 with ConvexHull method of scipy.Spatial

I am trying out https://github.com/alievk/avatarify in my Mac OS X and when I try executing the program after all the installation steps, I face the following error. run_mac.sh: line 11: 80178 Segmentation fault: 11 python cam_fomm.py --config…
karsep5
  • 72
  • 8
0
votes
1 answer

How do I translate the position of a moving point according to a reference point?

Given two moving points/particles with positions in cartesian coordinates x, y, z as a function of time as given bellow, how do I center one of the points and calculate the resulting positions of the second point while maintaining their relative…
besi
  • 171
  • 1
  • 9