Previous question · 70
Arithmetic Slices
mediumAlgorithms
Next question · 72
Kendall Tau Correlation
easyStatistics
Random coding question

71. Bounding box representation

easy
GeneralGeneral
senior
Function contract
Inputs
boxes
np.ndarray
Returns
value
np.ndarray

Examples

Input
{
  "boxes": [
    [
      10,
      20,
      30,
      60
    ],
    [
      0,
      0,
      100,
      50
    ],
    [
      5.5,
      7.25,
      15.75,
      20.5
    ]
  ]
}
Output
[
  [
    20,
    40,
    20,
    40
  ],
  [
    50,
    25,
    100,
    50
  ],
  [
    10.625,
    13.875,
    10.25,
    13.25
  ]
]

Constraints

Hint 1
Hint 2
Hint 3
Roles
ML Engineer
AI Engineer
Data Scientist
Research Scientist
Companies
GeneralGeneral
Levels
senior
entry
Tags
bounding-boxes
numpy-vectorization
computer-vision
coordinate-transforms

Similar Questions

Linear Regressionmedium
ML Coding
Activation function relueasy
ML Coding
Text normalizationmedium
ML Coding
50 people are solving this problem
Loading editor for the selected language
Ln 1, Col 1
Program Output
DATAINTERVIEW
Interactive coding terminal
Python / NumPy environment ready.
Type a command below or run code from the editor.
run scriptExecute the current editor contents
submitGrade the current editor contents against all solution test cases
python ("print hello world")Run an isolated Python command
helpShow all available commands