* fix : profiling added to test system

* doc : CHANGELOG updated

* fix : profile.py renamed to samila_profile.py
pull/141/head
Sepand Haghighi 2022-06-21 08:16:55 +04:30 zatwierdzone przez GitHub
rodzic 73f8fe8ce0
commit 66d2c788d0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 24 dodań i 0 usunięć

Wyświetl plik

@ -60,3 +60,6 @@ jobs:
run: |
codecov
if: matrix.python-version == 3.7 && matrix.os == 'ubuntu-latest'
- name: cProfile
run: |
python -m cProfile -s cumtime otherfiles/samila_profile.py

Wyświetl plik

@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
### Changed
- Random mode modified
- Test system modified
## [0.8] - 2022-06-01
### Added
- `INVALID_COLOR_TYPE_ERROR` error

Wyświetl plik

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
"""Samila profile."""
from samila import *
import random
import math
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(seed=200)
g.plot()
g.save_image("test.png")