ednarzinho
Biblioteca Python didática para resolução de matrizes com passo a passo verificado, em pt-BR.
Resolve matrizes — inclusive simbólicas (com r, m, sin(θ), √, etc.), produtos
escalares e vetoriais — calcula determinante e inversa, e gera um notebook Jupyter
pronto com a resolução completa. Cada resultado é conferido por um método independente:
a biblioteca nunca devolve uma resposta errada em silêncio.
import ednarzinho as edz
edz.gerar_notebook([[2, 1], [3, 4]], "resolucao.ipynb")
# → cria um .ipynb com a matriz, o determinante, a inversa e o passo a passo.
Instalação
pip install ednarzinho
Requer Python 3.12+. Instala o SymPy automaticamente.
Uso
Caso principal: resolver uma matriz e gerar o notebook
A função gerar_notebook recebe a matriz (números ou expressões simbólicas em string) e
escreve um .ipynb autossuficiente — pronto para entregar:
import ednarzinho as edz
A = [
["sqrt(1 - 2*m/r)", 0, 0, 0],
[0, "sqrt((1-2*m/r)**(-1))*sin(theta)*cos(phi)", "r*cos(theta)*cos(phi)", "-r*sin(theta)*sin(phi)"],
[0, "sqrt((1-2*m/r)**(-1))*sin(theta)*sin(phi)", "r*cos(theta)*sin(phi)", "r*sin(theta)*cos(phi)"],
[0, "sqrt((1-2*m/r)**(-1))*cos(theta)", "-r*sin(theta)", 0],
]
edz.gerar_notebook(A, "resolucao.ipynb") # determinante + inversa (padrão)
edz.gerar_notebook(A, "so_det.ipynb", operacoes=["determinante"])
Resolver direto no código
import ednarzinho as edz
A = edz.Matriz([[2, 1], [3, 4]])
r = edz.resolver(A, operacao="determinante")
print(r.valor) # o determinante
print(r.markdown()) # passo a passo em Markdown
inv = edz.resolver(A, operacao="inversa")
print(inv.markdown()) # passo a passo da inversa (verificada por A·A⁻¹ = I)
Operações: determinante, inversa, gauss, gauss_jordan, sistema (com b=...).
Formatos de saída de uma Resolucao: .markdown(), .latex(), .terminal().
Por que "verificado"?
Para matrizes simbólicas, a eliminação de Gauss pode dividir por pivôs que se anulam.
Por isso a ednarzinho usa cofatores (expansão de Laplace para o determinante; método da
adjunta para a inversa) e cruza cada resultado com um algoritmo independente (Berkowitz,
A·A⁻¹ = I). Divergência → erro explícito, nunca um valor errado silencioso.
Desenvolvimento
git clone <URL-do-seu-repositorio> # ajuste para o seu GitHub
cd ednarzinho
python -m pip install -e ".[dev]"
python -m pytest # 344 testes
python -m ruff check src/
No Windows, se a ativação do venv falhar por política de execução, use
.venv\Scripts\python.exe -m ...diretamente.
Licença
MIT — veja LICENSE.
Metadata
Release files for ednarzinho 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ednarzinho-0.1.0.tar.gz | 100.5 kB | Without provenance | Details for ednarzinho-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ednarzinho-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for ednarzinho-0.1.0-py3-none-any.whl |
Total release size: 185.4 kB
Release files / ednarzinho-0.1.0.tar.gz
| Download URL | ednarzinho-0.1.0.tar.gz |
|---|---|
| Size | 100.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6bb2bc0144cfe667c38003a6fbf778813165c07da03024538ead6b196f50617d
|
|
BLAKE2b-256 checksum How to use checksums |
9d0b773e230a7d397bcc1874ceb7144f4ef0c4c0b560343356fd7a59ec8705df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Release files / ednarzinho-0.1.0-py3-none-any.whl
| Download URL | ednarzinho-0.1.0-py3-none-any.whl |
|---|---|
| Size | 84.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e38c799bc96133eb4565f803ca93fc47608e47bd42acb8b2608683ddc36352a
|
|
BLAKE2b-256 checksum How to use checksums |
41d321637eca7fbcb32e3a9019a77f78088a4dcb7665d129d58c05e010c47158
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Security for ednarzinho 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.