Previous question · 294
Month-over-Month Sales Growth
hardDatabase
Next question · 296
Jill and Eva Orders
mediumDatabase
Random coding question

295. Image augmentation transforms

easy
GeneralGeneral
senior
Function contract
Inputs
img
np.ndarray
crop
list
flip
int
brightness
float
Returns
value
np.ndarray

Examples

Input
{
  "img": [
    [
      0.1,
      0.2,
      0.3
    ],
    [
      0.4,
      0.5,
      0.6
    ]
  ],
  "crop": [
    0,
    1,
    2,
    2
  ],
  "flip": true,
  "brightness": 2
}
Output
[
  [
    0.4,
    0.2
  ],
  [
    1,
    0.8
  ]
]

Constraints

Hint 1
Hint 2
Hint 3
Roles
ML Engineer
AI Engineer
Data Scientist
Research Scientist
Companies
GeneralGeneral
Levels
senior
entry
Tags
image-augmentation
2d-list-processing
array-slicing
list-comprehensions

Similar Questions

Linear Regressionmedium
ML Coding
Activation function relueasy
ML Coding
Text normalizationmedium
ML Coding
29 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