Previous question · 1338
Copy List With Random Pointer
mediumData Structures
Next question · 1340
Pair Fans With Haters
mediumDatabase
Random coding question

1339. Image normalization

easy
GeneralGeneral
senior
Function contract
Inputs
std
np.ndarray
mean
np.ndarray
image
np.ndarray
Returns
value
np.ndarray

Examples

Input
{
  "std": [
    10,
    10,
    10
  ],
  "mean": [
    0,
    10,
    20
  ],
  "image": [
    [
      [
        0,
        10,
        20
      ],
      [
        30,
        40,
        50
      ]
    ],
    [
      [
        60,
        70,
        80
      ],
      [
        90,
        100,
        110
      ]
    ]
  ]
}
Output
[
  [
    [
      0,
      0,
      0
    ],
    [
      3,
      3,
      3
    ]
  ],
  [
    [
      6,
      6,
      6
    ],
    [
      9,
      9,
      9
    ]
  ]
]

Constraints

Hint 1
Hint 2
Hint 3
Roles
ML Engineer
AI Engineer
Data Scientist
Research Scientist
Companies
GeneralGeneral
Levels
senior
entry
Tags
numpy-broadcasting
image-preprocessing
array-shapes
normalization

Similar Questions

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