python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Create dummy variable for all neighborhood region depending on another dummy variable (sf object)
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 "dummy_neighb...
Tom
Votes: 0
Answers: 1
Spawning pathfinder neighbours
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 he...
Krellex
Votes: 0
Answers: 1
Most efficient way to check cells and change neighbors matching a condition in a dataframe
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...
JackBox
Votes: 0
Answers: 1
numpy store the neigborhood as new (3rd) dimension into matrix
Given a numpy array like:
L = 2
np.random.randint([-1,1],size=(L,L), dtype=int)
array([[1, -1],
[-1, 1]])
How can I transform it into an array of similar shape (efficiently)
np.random.choice([...
Georg Heiler
Votes: 0
Answers: 1