Files
ml-sdk/tests/seeding/test_seeding_system_file_b.py
zeekay bde2e2531b Initial commit: Lux FHE ML SDK
Machine Learning with FHE - fork of Zama Concrete-ML
- Built-in FHE-friendly ML models
- scikit-learn compatible API
- PyTorch model conversion
- Quantization-aware training
2025-12-27 21:08:09 -08:00

54 lines
1.1 KiB
Python

"""Tests for the torch to numpy module."""
import random
import numpy
import pytest
def body():
"""Common function used in the tests, which picks random from numpy in different ways."""
numpy.set_printoptions(threshold=10000)
numpy.set_printoptions(linewidth=10000)
print("Output: ", end="")
# Python random
for _ in range(1):
print(random.randint(0, 1000), end="")
# Numpy random
for _ in range(1):
print(numpy.random.randint(0, 1000), end="")
print(numpy.random.uniform(-100, 100, size=(3, 3)).flatten(), end="")
@pytest.mark.parametrize("parameters", [1, 2, 3])
def test_bcm_seed_1(parameters):
"""Test python and numpy seeding."""
assert parameters is not None
body()
@pytest.mark.parametrize("parameters", [1, 3])
def test_bcm_seed_2(parameters):
"""Test python and numpy seeding."""
assert parameters is not None
body()
@pytest.mark.parametrize("parameters", ["a", "b"])
def test_bcm_seed_3(parameters):
"""Test python and numpy seeding."""
assert parameters is not None
body()
def test_bcm_seed_4():
"""Test python and numpy seeding."""
body()