Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
822 changes: 822 additions & 0 deletions _doc/notebooks/onnx_fft.ipynb

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions _unittests/ut_documentation/test_run_notebooks_fft.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
"""
@brief test log(time=7s)
"""
import os
import unittest
from pyquickhelper.loghelper import fLOG
from pyquickhelper.ipythonhelper import test_notebook_execution_coverage
from pyquickhelper.pycode import (
add_missing_development_version, ExtTestCase)
import mlprodict


class TestNotebookFFT(ExtTestCase):

def setUp(self):
add_missing_development_version(["jyquickhelper"], __file__, hide=True)

def test_notebook_fft(self):
fLOG(
__file__,
self._testMethodName,
OutputPrint=__name__ == "__main__")

self.assertNotEmpty(mlprodict is not None)
folder = os.path.join(os.path.dirname(__file__),
"..", "..", "_doc", "notebooks")
test_notebook_execution_coverage(__file__, "fft", folder,
this_module_name="mlprodict", fLOG=fLOG)


if __name__ == "__main__":
unittest.main()
10 changes: 9 additions & 1 deletion _unittests/ut_npy/test_numpy_onnx_pyrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,14 @@ def test_tanh_float32(self):
doc = nxnpy.tanh.__doc__
self.assertIn('tanh', doc)

def test_transpose_float32(self):
np_tr = lambda x, perm=None: numpy.transpose(x, perm)
x = numpy.array([[0.5, 0.1], [-0.5, -0.1], [1, 1]],
dtype=numpy.float32)
self.common_test1(
x, np_tr, nxnpy.transpose, # pylint: disable=E1101
FctVersion((numpy.float32, ), ((1, 0), )), perm=(1, 0))

def test_unsqueeze_float32(self):
x = numpy.array([[0.5, 0.1], [-0.5, -0.1]], dtype=numpy.float32)
axes = numpy.array([0], dtype=numpy.int64)
Expand All @@ -425,5 +433,5 @@ def test_where_float32(self):


if __name__ == "__main__":
TestNumpyOnnxFunction().test_where_float32()
# TestNumpyOnnxFunction().test_where_float32()
unittest.main()
Loading