Skip to main content

No project description provided

Project description

Toolbox

PyPi

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 least batch_size=1).
  • MatlabFuncHelper: this class simulate all Matlab functions in python (batch is supported).
    • batch
      • setBatchSize(batch_size) or setBS(batch_size)
      • getBatchSize() or getBS()
    • 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) or eye(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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

textremo_toolbox-1.0.16.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

textremo_toolbox-1.0.16-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file textremo_toolbox-1.0.16.tar.gz.

File metadata

  • Download URL: textremo_toolbox-1.0.16.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.13

File hashes

Hashes for textremo_toolbox-1.0.16.tar.gz
Algorithm Hash digest
SHA256 b5e10a1abdb9b1964900f2c305040d14c3457bf5aa99e9fc755fe0f66eed2183
MD5 f83d3b7a2c004d5462f9c492dd496695
BLAKE2b-256 c8ed71f137790ae393bc16f00c5bdd6fad757b152eea257b0393f3c2095eb040

See more details on using hashes here.

File details

Details for the file textremo_toolbox-1.0.16-py3-none-any.whl.

File metadata

File hashes

Hashes for textremo_toolbox-1.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 843601be7419b36d26f47a9bd21fa4ceb53b77b93ef411c8841e9d9277657119
MD5 8a9e39e203b73ae2f4874cb12d182882
BLAKE2b-256 fad80cc88cbb6cd31a90714c9f3b7d5b338503c27f09973dd308ceff1a387d31

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page