Длинное описание, которое когда-то появится
Для сборки:
python -m pip install --upgrade build wheel twine
python -m pip install -r requirements.txt
python -m build --no-isolation
twine upload dist/*
Для установки:
pip install -i https://test.pypi.org/simple/ miptlabs
Чтобы нарисовать что-то:
from miptlabs.plotter import pretty_plot, show
from numpy import linspace
# точки для построения графика
x = linspace(0, 5, 20)
y = x * x
pretty_plot(x, y)
show()
Точки можно просто соединить написав line=True:
pretty_plot(x, y, line=True, legend='$y = x^2$')
Так как для данный с лаб простое соединение вряд ли подойдет, то в пакете есть разные апроксиматоры Для примера можно взять зависимость координаты от рвемени при равноускоренном движении
from src.miptlabs.plotter import pretty_plot, show
from src.miptlabs.approximators import Polynomial
from numpy import linspace
import numpy as np
# точки для построения графика
x = linspace(0, 5, 20)
y = x * x + np.random.normal(size=x.shape)
ax = pretty_plot(x, y, legend='$x = t^2$ + random')
# Апроксимация
approximator = Polynomial(deg=2)
appr_x, appr_y = approximator.approximate(x, y)
# Вывод формулы для латеха
print(approximator.label('t', 'x'))
# >>> $y = 1.03t^{2}-0.205t+0.158$
№ Построение графика. Параметры говорят сами за себя
pretty_plot(appr_x, appr_y, axes=ax, points=False, line=True,
legend=approximator.label('t', 'x'), xlabel='t, сек', ylabel='x, м', title='График $x(t)$')
ax.figure.savefig('examples/approx.png')
show()
Release files for miptlabs 1.0.17.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| miptlabs-1.0.17.1.tar.gz | 19.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| miptlabs-1.0.17.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.4 kB
Release files / miptlabs-1.0.17.1.tar.gz
| Download URL | miptlabs-1.0.17.1.tar.gz |
|---|---|
| Size | 19.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a362a640f6ca04cf9178840d54c1529400c158bbb59a2e5c30d9b52f68b7b42c
|
|
BLAKE2b-256 checksum How to use checksums |
71acbd9460b9d805dd2cc4aecb73b9805759e4f1c68757cbd7b817714358210a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7
|
Release files / miptlabs-1.0.17.1-py3-none-any.whl
| Download URL | miptlabs-1.0.17.1-py3-none-any.whl |
|---|---|
| Size | 24.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f67a481c184ce94ff182997357d88409c33e2780f9fc367b4c51074d32441a8
|
|
BLAKE2b-256 checksum How to use checksums |
60a7978d7b22b1fbcff26247e065fbc3f161814b16600a3965d4a0cf77b4c0f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7
|