/
githubmirror
/
scikit-learn
Обзор
Документация
Войти
/
githubmirror
/
scikit-learn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
sklearn/utils/tests/test_arpack.py
16 строк
489 B
Christine P. Chai
DOC: Correct many a/an usage mistakes (#32996)
05 янв 2026, 12:13
Не верифицирован
05 янв 2026, 12:13
3db0cd3
Код
Авторство
О чём код?
import pytest from numpy.testing import assert_allclose from sklearn.utils import check_random_state from sklearn.utils._arpack import _init_arpack_v0 @pytest.mark.parametrize("seed", range(100)) def test_init_arpack_v0(seed): # check that the initialization a sampling from a uniform distribution # where we can fix the random state size = 1000 v0 = _init_arpack_v0(size, seed) rng = check_random_state(seed) assert_allclose(v0, rng.uniform(-1, 1, size=size))