About 1,780,000 results
Open links in new tab
  1. algorithm - given a 2d array, find the "holes" - Stack Overflow

    Jul 30, 2014 · You can use simple DFS to find a hole as follows :-Do DFS on unvisited node if it is a 0; Terminate DFS if you reach 1 or boundary. Set a variable say boundary_hit = true if …

  2. algorithm - How can I find hole in a 2D matrix? - Stack Overflow

    Jun 21, 2013 · Counting the number of colours you found and set might already supply the information on whethere there are holes in the matrix. Otherwise, or to find where they are, …

  3. python - Counting "holes" in a numpy 2D matrix - Stack …

    Mar 29, 2019 · Sum of hole depths (no. of 1s above holes, summed across columns): 0+3+(1+1)+1+0+3+(2+8)+(2+1)+(1+1)+3 = 27 3. Number of rows with at least one hole: 7 I …

  4. coderbyte/bitmap_holes.py at master · Camsbury/coderbyte

    Using the Python language, have the function BitmapHoles(strArr) take the array of strings stored in strArr, which will be a 2D matrix of 0 and 1's, and determine how many holes, or contiguous …

  5. All adjacent of a given element in a 2D Array or Matrix

    Mar 24, 2025 · Given a 2d integer array arr, your task is to return all the adjacent elements of a particular integer whose position is given as (x, y). Note: Adjacent elements are all the …

  6. coderbyte-1/bitmap_holes.py at master · Hudehtech/coderbyte-1 - GitHub

    Using the Python language, have the function BitmapHoles(strArr) take the array of strings stored in strArr, which will be a 2D matrix of 0 and 1's, and determine how many holes, or contiguous …

  7. Searching Algorithms for 2D Arrays (Matrix) - GeeksforGeeks

    Apr 14, 2025 · In this article, we will explore three types of matrix search: Unsorted matrices, Completely sorted matrices, and Semi-sorted matrices (sorted row-wise, column-wise, or …

  8. Python | Using 2D arrays/lists the right way - GeeksforGeeks

    Jun 20, 2024 · Using 2D arrays/lists the right way involves understanding the structure, accessing elements, and efficiently manipulating data in a two-dimensional grid. By mastering the use of …

    Missing:

    • Holes

    Must include:

  9. binary_fill_holes — SciPy v1.15.3 Manual

    binary_fill_holes# scipy.ndimage. binary_fill_holes (input, structure = None, output = None, origin = 0, *, axes = None) [source] # Fill the holes in binary objects. Parameters: input array_like. N …

  10. How to count the number of holes in a numpy 2D grid?

    Nov 19, 2012 · You can use scipy.ndimage.measurements.label () to count contiguous areas, and numpy.isnan () to get a mask of the nodata values only. Example: [ 0., 0., 0., 0., 0.], [ 0., 0., 0., …

Refresh