diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2022-11-11 18:59:42 +0100 |
---|---|---|
committer | Marc Glisse <marc.glisse@inria.fr> | 2022-11-11 18:59:42 +0100 |
commit | 2d5039b7eeb16116ab859076aa0a93f092250d88 (patch) | |
tree | 9a89610dc9ff78fcb06126ed9cf9008fca08c209 /src/python/test | |
parent | 4118bcb622c624130e768d9116a7e147a5e45c68 (diff) |
Special case for writing 3d OFF
Diffstat (limited to 'src/python/test')
-rw-r--r-- | src/python/test/test_off.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/python/test/test_off.py b/src/python/test/test_off.py new file mode 100644 index 00000000..69bfa1f9 --- /dev/null +++ b/src/python/test/test_off.py @@ -0,0 +1,21 @@ +""" This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. + Author(s): Marc Glisse + + Copyright (C) 2022 Inria + + Modification(s): + - YYYY/MM Author: Description of the modification +""" + +import gudhi as gd +import numpy as np +import pytest + + +def test_off_rw(): + for dim in range(2, 6): + X = np.random.rand(123, dim) + gd.write_points_to_off_file('rand.off', X) + Y = gd.read_points_from_off_file('rand.off') + assert Y == pytest.approx(X) |