Add files via upload

Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
This commit is contained in:
David Rotermund 2024-01-03 14:47:16 +01:00 committed by GitHub
parent 98f3657934
commit 0f74e9bb19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 522 additions and 0 deletions

27
PyBind11/basics/test.py Normal file
View file

@ -0,0 +1,27 @@
from PyMyModuleCPU import MyModule
import numpy as np
MyCExtension = MyModule()
X = np.random.random((5, 6))
print("X")
print(X)
if MyCExtension.PutStuffIn(X) is False:
print("Error (1)\n")
exit()
Y = MyCExtension.GetStuffOut()
print("X-Y:")
print(X - Y)
if MyCExtension.DoStuff(5.0) is False:
print("Error (2)\n")
exit()
Z = MyCExtension.GetStuffOut()
print("X*5-Z:")
print(X * 5.0 - Z)