sepandhaghighi / samila

Generative Art Generator

Home Page:https://www.samila.site

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid equation warning

sepandhaghighi opened this issue · comments

Description

For some functions in some ranges there might be some computation-time errors which are not handled as an exception yet in Samila. This issue tracker would tack our solution to this problem.

Steps/Code to Reproduce

>>> from samila import *
>>> def f1(x, y):
...     return 1 / x
...
>>> def f2(x, y):
...     return y
...
>>> g = GenerativeImage(f1, f2)
>>> g.generate(start=0, stop=0.1)

Expected Behavior

A decent warning could be shown up and the program continue to generate other points.

Actual Behavior

Traceback (most recent call last):
    ...
ZeroDivisionError: float division by zero

Operating System

Ubuntu 20.04

Python Version

3.8.10

Samila Version (Use : samila.__version__)

0.6