From bb0146c935c65c2e1583ac165ea66589da9e493f Mon Sep 17 00:00:00 2001 From: sadrasabouri Date: Tue, 5 Oct 2021 13:31:34 +0330 Subject: [PATCH] [temp] add : add test.py to samila/. --- samila/test.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 samila/test.py diff --git a/samila/test.py b/samila/test.py new file mode 100644 index 0000000..60ac43a --- /dev/null +++ b/samila/test.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +"""Basic test file.""" +""" +>>> import random +>>> import math +>>> from samila import GenerativeImage +>>> def f1(x,y): +... result = random.uniform(-1,1) * x**2 - math.sin(y**2) + abs(y-x) +... return result +>>> def f2(x,y): +... result = random.uniform(-1,1) * y**3 - math.cos(x**2) + 2*x +... return result +>>> g = GenerativeImage(f1,f2) +>>> g.generate() +>>> g.plot() + +"""