Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
3 answers
141 views

I am processing a greyscale (8 bit) black-and-white image in Python with OpenCV. The image (2D numpy array with shape (100,200) ) contains pixels of only 2 colors - black (0) and white (255). Here is ...
0 votes
0 answers
159 views

Say, I have a point cloud of 30,000 points in 3D. I want to count the neighbors for each point at a cut-off distance. the following code always shows the neighbor count as 1 no matter what the ...
2 votes
1 answer
66 views

The following is an interesting algorithmic problem. Inputs: The set of elements S (say, non-negative integers). A mapping N that maps some elements from S to a subset S_k \subset S. (not all ...
1 vote
2 answers
159 views

Below I give an example in 2D, but my real question would be regarding 3D (with or without periodic boundaries). Find all unique neighbors for each segment id using 8 neighbors (2d) or 26 neighbors (...
1 vote
1 answer
213 views

i am making a virtual Hama beads tool online. (its a kids toy where you put plastic beads on a matrix and iron them to make them stick together and form a solid shape)like this one below (real hama) ...
0 votes
1 answer
501 views

I have two files': nodes.csv and edges.csv that contains nodes and edges between them as follow nodes.csv (182 nodes) look like 0 1 2 . . . and edges represented by 2 columns (300 edges) as 1 2 0 2 ...
0 votes
0 answers
74 views

How is the search for the nearest neighbors in the tree? Trying to find information, I get only some formulas without illustrative examples. enter image description here Example of a function: void ...
0 votes
2 answers
41 views

I've got everything working correctly except this one problem - with the third output it says the max pair sum is 13 due to taking sum of the first and last number. It should be 11 (as 9+2 or 4+7). I ...
oliv's user avatar
  • 11
0 votes
1 answer
99 views

What I have is a matrix of characters that looks like this: matrix = [ ['-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-'], ['-', '-', '-', '+',...
0 votes
2 answers
152 views

this my first question and I hope to collaborate in the community. I am in a project in which I must fill the NA values ​​with the average of their neighbors from a matrix of ncol = 10 and nrow = 10. ...
0 votes
1 answer
156 views

I'm trying to built 'Conway's Game of Life' but for some reason the number of neighbors are not calculated correctly, therefore I gets wrong results. please help me:) I'm pretty lost I don't know what'...
0 votes
1 answer
69 views

Thank you for earlier input on my question. In this model the boat moves diagonally across the world (which does not wrap, 00 bottom left, max-pycor & max-pxcor 49) and 20 fish move in the ...
Afada's user avatar
  • 17
-1 votes
1 answer
184 views

I have a spatial dataframe (sf) of all European NUTS2 regions. Within this sf object certain regions have a dummy = 1, and others a dummy = 0. How can I create a new dummy (lets say "...
0 votes
1 answer
114 views

I am trying to spawn the neighbours of my path finder but when doing so the original path (path) blue also becomes covered up. I have tried switching of the order of spawn but this does not seem to ...
0 votes
1 answer
496 views

I'm using a pandas dataframe to store a dynamic 2D game map for a rougelike style game map editor. The player can draw and erase rooms. I need to draw walls around these changing rooms. I have this: 0 ...

15 30 50 per page
1
2 3 4 5
...
11

AltStyle によって変換されたページ (->オリジナル) /