MCPcopy Index your code
hub / github.com/scikit-learn/scikit-learn / test_scale_1d

Function test_scale_1d

sklearn/preprocessing/tests/test_data.py:403–412  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

401
402
403def test_scale_1d():
404 # 1-d inputs
405 X_list = [1.0, 3.0, 5.0, 0.0]
406 X_arr = np.array(X_list)
407
408 for X in [X_list, X_arr]:
409 X_scaled = scale(X)
410 assert_array_almost_equal(X_scaled.mean(), 0.0)
411 assert_array_almost_equal(X_scaled.std(), 1.0)
412 assert_array_equal(scale(X, with_mean=False, with_std=False), X)
413
414
415@skip_if_32bit

Callers

nothing calls this directly

Calls 1

scaleFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…