MATLAB style numpy and sympy
Create matrix, call function in MATLAB style
Installation
pip install pyMATLABstyle
Import
from MATLAB import *
MATLAB style numpy
Includes:
-
mat
-
inv
-
rank
-
det
-
exp
matN = mat('1 2 3;4 7,2;6,7,8')
print('matN:', matN, sep='\n')
matN:
[[1 2 3]
[4 7 2]
[6 7 8]]
print('rank:', rank(matN))
print('inv:', inv(matN) * (matN), sep='\n')
print('det:', det(matN))
print('exp:', exp(matN, 2) - matN * matN, sep='\n')
rank: 3
inv:
[[ 1.00000000e+00 2.77555756e-16 4.44089210e-16]
[ 3.33066907e-16 1.00000000e+00 0.00000000e+00]
[-3.46944695e-17 -5.89805982e-17 1.00000000e+00]]
det: -40.000000000000014
exp:
[[0 0 0]
[0 0 0]
[0 0 0]]
MATLAB style syms
syms == sympy.symbols
x, y, z = syms('x, y z')
f = x**(y - z)
print(f)
x**(y - z)
MATLAB style sympy matrix
Includes:
-
smat
-
sinv
-
sdet
-
sexp
matS = smat('x11 x12 x13;x21,x22,x23;x31,x32 x33')
print('matS:', matS, sep='\n')
matS:
Matrix([[x11, x12, x13], [x21, x22, x23], [x31, x32, x33]])
print('rank:', matS.rank())
print('inv:', sinv(matS) * (matS), sep='\n')
print('det:', sdet(matS))
print('exp:', sexp(matS, 2) - matS * matS, sep='\n')
rank: 3
inv:
Matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]])
det: x11*x22*x33 - x11*x23*x32 - x12*x21*x33 + x12*x23*x31 + x13*x21*x32 - x13*x22*x31
exp:
Matrix([[0, 0, 0], [0, 0, 0], [0, 0, 0]])
Metadata
Release files for pyMATLABstyle 1.2.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 | Provenance | |
|---|---|---|---|---|
| pyMATLABstyle-1.2.1.tar.gz | 2.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyMATLABstyle-1.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.0 kB
Release files / pyMATLABstyle-1.2.1.tar.gz
| Download URL | pyMATLABstyle-1.2.1.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a49e7c4397bd070a3d6880c2a805909a78579c7f6489b21fca529b6eb30dfe9
|
|
BLAKE2b-256 checksum How to use checksums |
7e328a47b19572fef6d3662e746b5a5df1177b5b1226ac887a7a44b0817a1f9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Release files / pyMATLABstyle-1.2.1-py3-none-any.whl
| Download URL | pyMATLABstyle-1.2.1-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36170d73e7a9f911239dd67ec9f2797954bb4405772fac9dd359f72ef8f293dc
|
|
BLAKE2b-256 checksum How to use checksums |
eed8232824fb0eca1e4270623616c17ccf8057b921f09bf4aa1967d363dbbf0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Security for pyMATLABstyle 1.2.1
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.