Skip to main content

A module to allow Python to call functions from a compiled Matlab archive

Project description

libpymcr

libpymcr is a Python module for loading a compiled Matlab ctf archive and running functions within it in Python.

Whilst there is an official Mathworks binding for Python, libpymcr provides a few benefits over the official package:

  • It is compatible with versions of Python not supported by Matlab (e.g. 3.10, 3.11, 3.12). Moreover, the supported Python versions are not locked to the Matlab versions, unlike with the official packages.
  • When converting data between Matlab and Python it avoids data copies where ever possible by wrapping the underlying arrays in the target type (numpy or Matlab mxArray). In the official bindings, a data copy is required when converting data from Python to Matlab (inputs to functions).
  • It provides a simpler syntax, and if you include the provided call.m and call_python.mex files in your compiled package, you will also be able to access Matlab objects transparently in Python, and pass Python callables to Matlab to evaluate (e.g. in a fitting routine).

Getting started

You can install the package using:

pip install libpymcr

You must create a compiled Matlab archive (ctf file) of your program using the Matlab Compiler SDK toolbox, using the mcc command:

mcc -W CTF:your_program_name -U mfile1 mfile2 mfile3

Then in Python, you can load this and call the Matlab functions with:

import libpymcr
m = libpymcr.Matlab('your_program_name.ctf')
m.mfile1()

The functions, mfile1, mfile2 etc. are exposed to Python can can be called as methods of the Matlab() object.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

libpymcr-0.2.1-cp313-cp313-win_amd64.whl (234.6 kB view details)

Uploaded CPython 3.13Windows x86-64

libpymcr-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (278.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

libpymcr-0.2.1-cp313-cp313-macosx_14_0_arm64.whl (213.7 kB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

libpymcr-0.2.1-cp313-cp313-macosx_11_0_x86_64.whl (236.3 kB view details)

Uploaded CPython 3.13macOS 11.0+ x86-64

libpymcr-0.2.1-cp312-cp312-win_amd64.whl (234.5 kB view details)

Uploaded CPython 3.12Windows x86-64

libpymcr-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (278.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

libpymcr-0.2.1-cp312-cp312-macosx_14_0_arm64.whl (213.7 kB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

libpymcr-0.2.1-cp312-cp312-macosx_11_0_x86_64.whl (236.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

libpymcr-0.2.1-cp311-cp311-win_amd64.whl (234.3 kB view details)

Uploaded CPython 3.11Windows x86-64

libpymcr-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (279.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

libpymcr-0.2.1-cp311-cp311-macosx_14_0_arm64.whl (214.2 kB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

libpymcr-0.2.1-cp311-cp311-macosx_11_0_x86_64.whl (237.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

libpymcr-0.2.1-cp310-cp310-win_amd64.whl (233.3 kB view details)

Uploaded CPython 3.10Windows x86-64

libpymcr-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (277.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

libpymcr-0.2.1-cp310-cp310-macosx_14_0_arm64.whl (212.6 kB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

libpymcr-0.2.1-cp310-cp310-macosx_11_0_x86_64.whl (235.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

libpymcr-0.2.1-cp39-cp39-win_amd64.whl (233.7 kB view details)

Uploaded CPython 3.9Windows x86-64

libpymcr-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (278.4 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

libpymcr-0.2.1-cp39-cp39-macosx_14_0_arm64.whl (212.6 kB view details)

Uploaded CPython 3.9macOS 14.0+ ARM64

libpymcr-0.2.1-cp39-cp39-macosx_11_0_x86_64.whl (235.8 kB view details)

Uploaded CPython 3.9macOS 11.0+ x86-64

libpymcr-0.2.1-cp38-cp38-win_amd64.whl (233.2 kB view details)

Uploaded CPython 3.8Windows x86-64

libpymcr-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (278.3 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

libpymcr-0.2.1-cp38-cp38-macosx_14_0_arm64.whl (212.3 kB view details)

Uploaded CPython 3.8macOS 14.0+ ARM64

libpymcr-0.2.1-cp38-cp38-macosx_11_0_x86_64.whl (235.6 kB view details)

Uploaded CPython 3.8macOS 11.0+ x86-64

File details

Details for the file libpymcr-0.2.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: libpymcr-0.2.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 234.6 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for libpymcr-0.2.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b1fb8ca475e82880b7ed89edbcca3436ec719b653c0c4eca95a27274a0b50325
MD5 a80a082e7f1040d055a3b0e2a3a502c2
BLAKE2b-256 7383f278780bd0a6b388f100933534898ca4d2b78a0bf2ef52e1b664354cd87d

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for libpymcr-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 184a901f1362101886c806488439ec23cd84ac129a69072f61d36ee6157c58fe
MD5 234359eedc8a33d29720c2ea67a1be80
BLAKE2b-256 6276527636bfb1586bfde12a6539a0f9d96a8a9c4f29031af9764ec24324eca1

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for libpymcr-0.2.1-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 4c37cb5b555b0caa943e08b68fdb93aca199acecdc93394a86a0aa7d5ef0c261
MD5 e083b8b142fa5358b85e5b69ddcfe478
BLAKE2b-256 415e2abea3ed2eca0ab74e45ad7caae8cc52dde052dbed2f6879902a52dda84e

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp313-cp313-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for libpymcr-0.2.1-cp313-cp313-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 d3a1e49cb67729e9a4fc5aa15a2282375881ef606b2fbdccb2c00b5d38671154
MD5 cc94605f826a50654335d92cafb9dc58
BLAKE2b-256 e16e3f1d8d54b245b43ac62839b318147b09fab8132e776ece7aabcc4cca18ee

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: libpymcr-0.2.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 234.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for libpymcr-0.2.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 dd9fcab25d544551b68af8c8d07e2cc748d9edbf261f0fa2a73cf8109aa50ebd
MD5 3ee7e6f68f57513378d1e3cb631f1e8d
BLAKE2b-256 3fd1a8a427978871e0ff0559e772c52cc181bfc5e7e31d0c0b559e5aa7468ef7

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for libpymcr-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c3cd27a9782131e0c7d7898fc99ec9f86765b22331f5ad42b7f3ea05bc2f15f9
MD5 6cbf837a1fc28d79ec5526e52b0a6b3a
BLAKE2b-256 5b33b76df24a2b5902476652f3319d151262383508e52b0d4b0457344543af32

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for libpymcr-0.2.1-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 8dfe18811f9a075ca5e3aa0b468415f15c277e84bcaa4d10b7b9fa15d9909689
MD5 f572650e033ad567ab11a97206409c3a
BLAKE2b-256 85fd450aec80098e48d5e113e6887f1b2f227c57dc8c030630a258749b969703

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for libpymcr-0.2.1-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 345dae9dd494c3ef43ba30fdcd308e2d1f1bb001e1d90883ce7bdc5ce3a5c4bb
MD5 33dbcb0db842b02c0bcf843003d93c3d
BLAKE2b-256 4bbf7ee4895dbde82a6e1ae4320b75015f122544541302866cc52cd03e0ea2cc

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: libpymcr-0.2.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 234.3 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for libpymcr-0.2.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6cd2c909d4c5c139664e6d0b6f3cf7085c92ef638b5b6a33213878659bd7256d
MD5 e226e195e578aed0b3fc8ebd8fc22df0
BLAKE2b-256 a9fe591dd6348af2febb6c3832ea090a9e19c7a7f51ec021b1747ce604fcaa4b

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for libpymcr-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5f4544a1a4aaa1b67edfddf5b2dd73b1abb413088407879558c9fc6cb097aa21
MD5 01864c95022a05e21874ca5cbea18724
BLAKE2b-256 b9af72ff6c3c281cfdd999d002d201caf5137086347d906e623fe811d3ae543b

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for libpymcr-0.2.1-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 244e4e742b887e310e55f92c14ef2d1e0d716ff3f3d7b5a8f607b046fde36b47
MD5 e52b8e09f00aa2e2aa6964793504a9cc
BLAKE2b-256 541c7ab3882a4ff675553dfb3773dc386cd434a316c090a497a9b9934560f1d8

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for libpymcr-0.2.1-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 f80824c156aa184730f80fa33c62fcc644c80e4e64525b2a2553c200dde80462
MD5 9a0f4f9aefba446d170b506b029e8a96
BLAKE2b-256 76d2010bcf9cd9af3fe03311c98b9ea21ca53c0ad1f5e0e80df811bc1800ffa6

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: libpymcr-0.2.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 233.3 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for libpymcr-0.2.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d2c9c07c3f14e13e5bf80f29fc48af187ed65bdf2382a843dedff0416f239370
MD5 5dae9cb747150e1cba1a5635dec20c69
BLAKE2b-256 f05549bbbe5f5d8f293843659e10ad8e385bca2a2b92f82ba56206e58ad1ae78

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for libpymcr-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2571a02039c7d1aa203f5598f10a9234fc57ad9e5c2e29e34aba034722d79cc4
MD5 6d2650b4f1fb84f5116ac320428ffcda
BLAKE2b-256 187f21ac49536028d39632799d8f5c4ba5458c366d87bb0dd2643f2776906f00

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for libpymcr-0.2.1-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 9506423a6c30609669b45edb6a83770bf95e1c7e2cc700bf52cc0b081f737d2b
MD5 6052713de9b61fb9e7d9c114c45e9657
BLAKE2b-256 d922720c09f39b67fd6d84aaa8f849a8f1eeb9795543af0e56fae2c2eeca9a61

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for libpymcr-0.2.1-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 c775511682470f192cdb716e2ce494caac19cc497058a871a0ed0e1ab0613ed4
MD5 5b8381c38f2b56b97ae540808f441be5
BLAKE2b-256 92152844723228141e8c0e03bc3fb22e9f277611dab7f7883163f1d2b744f826

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: libpymcr-0.2.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 233.7 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for libpymcr-0.2.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 44aecf4606ed7b42a82fd0639557f18c95cb787f6d3c5538c53b20ce1aad5a2c
MD5 73ecd5d05085189ff4d21da10cb3f260
BLAKE2b-256 1cc2725067941833e7d4ec33535aa6d31c3547ea805c70200e98ca43190c4237

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for libpymcr-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1d9849cf7ce95d38885fc541cdf25ef6653290ff65d9362e9f952924d58d8609
MD5 3c0454dc3d1a36ebb016b431b7bfdb3d
BLAKE2b-256 9ccb54d1b21f5d085a9added64d3b55ca2b5275b64fd1c626189173ea32d625e

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp39-cp39-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for libpymcr-0.2.1-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 b8fb7566749c9c06e154d43e83122e9f52a8281c6fa22b3c88d69f00f8071430
MD5 3bad9e0ceabbfec4489c61a00daa0670
BLAKE2b-256 be46e9322a8b7ee9ad1fd79d16faa83a8103d6ea37f2313133fa1039ee2f071a

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp39-cp39-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for libpymcr-0.2.1-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 377632222928c38b98d3d124584964b3778134388af24a63c103e3b3d3724d72
MD5 6878675d8ff5fe4d0ff3c521b5004d9a
BLAKE2b-256 27139ae00310f075524d2bac67fa3934a34b2621d798a4389a93237ebc633e1f

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: libpymcr-0.2.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 233.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for libpymcr-0.2.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 384b88ef00d7e62d3ab0a668bb456b93a88e9dc89f13aa563436687f77fcbcd5
MD5 d70172f9ba019a322d07b4e73f9f180f
BLAKE2b-256 a83ef0b75320cd79e4b507bda475baa8592ef8dea7fb8c16942df572888e684c

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for libpymcr-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bc8d4ceb34c81d808aaec8e641307edd9a0c05029eaf05ba61ce579d45724a34
MD5 7dcd76e396211ad397051a9c6b157fcf
BLAKE2b-256 afb622e2ce38c68ebc78c4686410fa7fa2e3180c26c7d2e57c17d78c0fc9e29f

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp38-cp38-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for libpymcr-0.2.1-cp38-cp38-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 7a4e211d8283c2aafb2326b9eee11c006932e03ea71f98a1cd12f8c518ff9a68
MD5 f552cc7bf703a343106dbc52fd800e5b
BLAKE2b-256 8b719b4ac731db5dde7b8d7f1de490d1d5f58006a18ee6be0b052b057f6bb081

See more details on using hashes here.

File details

Details for the file libpymcr-0.2.1-cp38-cp38-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for libpymcr-0.2.1-cp38-cp38-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 b2d946e8d4f6f66f042222b5a20c24b4bec2868489367d43aef3c86a560c9f66
MD5 68ec0ce6b4b373b5d92c2009d0cfd05c
BLAKE2b-256 63c86e1200a59d9e456138f07a2b2929f335c4d7f9f93f7b151100a9560ad415

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