No project description provided
Project description
Toolbox
This repositories offers a toolbox across platforms.
How to use
- MatlabFuncs: this class simulate all Matlab functions for
numpy,pytorch,tensorflow. Please note that data must be batched (at leastbatch_size=1). - MatlabFuncHelper: this class simulate all Matlab functions in python (batch is supported).
- batch
setBatchSize(batch_size)orsetBS(batch_size)getBatchSize()orgetBS()
- data type selectors
- toNP(): to numpy
- toPT(): to pytorch
- toTF(): to tensorflow
- checkers
- isvector(mat)
- ismatrix(mat)
- isnan(mat)
- generators
- zeros(d1, d2, ...)
- ones(d1, d2, ...)
- eye(d1, ...):
eye(d1)oreye(d1, d2) - seq(): generate a sequence,
seq(end),seq(beg, end),seq(beg, step, end) - rand(d1, d2, ...):
- randn(d1, d2, ...):
- dftmtx(d1): generate the discrete transform matrix
- transformers
- squeeze(mat): remove redundant dimension except for the batch_size
- reshape(mat, d1, d2, ...):
- repmat1(mat, d1, d2, ...): repeat the matrix in the given dimension (the batch dim is repeated as 1)
- repmatN(mat, d1, d2, ...): repeat the matrix in the given dimension (the batch dim is repeated as batch_size)
- diag(mat): generate a matrix based on its diag or get a diagonal matrix from its vector
@mat: a vector as [(batch_size), n, 1] or [(batch_size), 1, n]; if n == 1, it will be taken as [(batch_size), n, 1]. Or a square matrix [(batch_size), n, n] - circshift(mat, step): circular shift (1st index except for the batch size)
- Maths
- sum(): sum along the last axis
- max(): return the maximum of a matrix or the maximum of two matrices (for complex value, we compare the magnitude)
self.max(mat1, axis=-1); // return the maximum of a matrix, axis tells which axis to look at self.max(mat1, 4); // return the maximum of a matrix and the given value self.max(mat1, mat2); // return the maximum of two matrices
- kron(a, b): Kronecker produc
- batch
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file textremo_toolbox-1.0.17.tar.gz.
File metadata
- Download URL: textremo_toolbox-1.0.17.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55c958a76a90bcaaeeffcd6e3c6ef83827c81e3a230d8318e69195a25ed17d69
|
|
| MD5 |
5fe3f9bd5640e6d06d5020fe058ef041
|
|
| BLAKE2b-256 |
7332cfca145a80fd9b8552db383a02c07cfbeff05741a9d31c7be1788dc6b3dd
|
File details
Details for the file textremo_toolbox-1.0.17-py3-none-any.whl.
File metadata
- Download URL: textremo_toolbox-1.0.17-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4fb073836fed6caf9eb55b9798cbe75de46b59d55df0eb3aeb42ba61a2c1417
|
|
| MD5 |
0210a83f31fd1bd266ad769c38f59403
|
|
| BLAKE2b-256 |
ba0f1601af4575a9a7bbd7a68ab137c1cf8d1ae7c97f0ab2470a115634d7cca0
|