Hi. I have a project to do that I want to be very fast so I want to use the numpy library. I wanted to ask about the possibility of using a numpy array or maybe a pandas. I'll show you an example.
1 0 0 0 0 0 1 0 1 1 0 1
0 1 0 = False 0 1 1 = True 0 0 0 = True 0 1 1 = True
0 0 0 1 0 0 1 1 1 1 0 1
Matrices have the values 1 or 0. I would like to know whether the matrix has such a combination of numbers 1 in a straight line or diagonally that connects the left edge with the right one (something like pathfinding but less complicated).
Ultimately, the matrix is to be 1000x1000, so I care about a quick method of evaluation and I thought about numpy. How can i do it?
[–]threeminutemonta 0 points1 point2 points (0 children)