Skip to main content

Crate ocas_py

Crate ocas_py 

Source
Expand description

Python bindings for oCAS.

The top-level Python module is named ocas (see pyproject.toml).

§Quick start

import ocas

e = ocas.Expression("x^2 + 2*x + 1")
print(e.diff("x"))                 # derivative
print(e.simplify())

print(ocas.solve_diophantine(3, 5, 1))

Re-exports§

pub use algebraic::PyAlgebraicElement;
pub use algebraic::PyAlgebraicExtension;
pub use algebraic::PyAlgebraicFactor;
pub use algebraic::PyAlgebraicPolynomial;
pub use domain::PyFiniteField;
pub use domain::PyIntegerDomain;
pub use domain::PyRationalDomain;
pub use dual::PyDualShape;
pub use dual::PyHyperDual;
pub use eval::PyExpressionEvaluator;
pub use expression::Expression;
pub use matrix::PyMatrix;
pub use ntheory::py_crt;
pub use ntheory::py_discrete_log;
pub use ntheory::py_divisor_count;
pub use ntheory::py_divisor_sigma;
pub use ntheory::py_factorint;
pub use ntheory::py_isprime;
pub use ntheory::py_isprime_u64;
pub use ntheory::py_jacobi_symbol;
pub use ntheory::py_liouville_lambda;
pub use ntheory::py_mobius;
pub use ntheory::py_nextprime;
pub use ntheory::py_totient;
pub use numeric::PyIntegrateResult;
pub use numeric::PyVegas;
pub use numeric::integrate_1d;
pub use ode::py_classify_ode;
pub use ode::py_dsolve;
pub use ode::py_dsolve_ivp;
pub use polynomial::PyPolynomial;
pub use polynomial::PyPolynomialFactor;
pub use solve::PyDiophantineSolution;
pub use solve::py_solve_diophantine;
pub use solve::py_solve_linear_integer;
pub use solve::py_solve_linear_rational;
pub use tensor::PyTensor;
pub use tensor::canonicalize_tensors;
pub use tensor::contract_tensors;
pub use tensor::refresh_dummies;
pub use tensor::tensor_symmetrise_sign;
pub use tensor::young_project;

Modules§

algebraic
Python bindings for algebraic number fields and polynomials over them.
domain
Python Domain classes — coefficient-domain selectors.
dual
Python bindings for hyper-dual numbers (forward automatic differentiation).
eval
Python evaluation module — numeric evaluation of expressions.
expression
Python Expression — a self-contained symbolic expression.
matrix
Python Matrix class — dense matrices over ℤ, ℚ, or GF(p).
ntheory
Python ntheory module — number-theory functions (SymPy ntheory style).
numeric
Python bindings for numerical integration (Vegas adaptive Monte Carlo).
ode
Python ode module — ordinary differential equation solvers.
polynomial
Python Polynomial class — dense univariate polynomials over ℤ, ℚ, or GF(p).
solve
Python solve module — linear and Diophantine equation solvers.
tensor
Python bindings for the basic tensor algebra module.