Skip to main content

Python interface to operate with dspace.

Project description

WIP

Python interface for interoperability with dSpace running in Matlab. pyDspace has been designed to used inside Jupyter Notebooks.

Dependencies

  • python >= 3.6
  • numpy
  • matlabengineforpython

Installation

pip install pydspace

API

Import the module as usual

import pydspace

When importing the module a Matlab engine is created and you can use:

pydspace.get_matlab_engine()
pydspace.reset_matlab_engine()
pydspace.kill_matlab_engine()

In order to open dspace from the jupyter notebook, first you must specify where the Matlab Dspace is located with:

pydspace.set_dspace_path(dspace_path)

now you can call dspace as usual with numpy arrays, pandas dataframes and queries made with datajoint.

df = pd.read_csv(CSV_PATH)
N = len(df)

M1 = np.random.rand(N,100)
M2 = np.random.rand(N,100)
M_no_name = np.random.rand(N,100)

# Datajoint 
data = query.fetch()

dspace = pydspace.dspace(df, "matrix1", M1, "matrix2", M2, M_no_name, data)

the returned object is a DspaceWrapper object that implements the following methods:

dspace.dsource_info() # Prints info about the dsource object
dspace.add_data("new_matrix", M3, M2_no_name) # Adds additional sources.

you can find more detailed info about the methods in their corresponding docstring.

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

pydspace-0.1.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

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

pydspace-0.1-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file pydspace-0.1.tar.gz.

File metadata

  • Download URL: pydspace-0.1.tar.gz
  • Upload date:
  • Size: 25.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for pydspace-0.1.tar.gz
Algorithm Hash digest
SHA256 ea9ab1867c1e41077df57147c166b4094ac2571e88e8785eeb9e6902e2715367
MD5 25e1b5b8828429dbce9aeb6af92639b2
BLAKE2b-256 a6a8e166bd27685a1141a2f3ca545c747a31b5a3f639330c48754021d4b79c10

See more details on using hashes here.

File details

Details for the file pydspace-0.1-py3-none-any.whl.

File metadata

  • Download URL: pydspace-0.1-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for pydspace-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 44ef06a21c8dd8a371103556624012231c57b9f36a2b3654e02363d8be9ffac1
MD5 032f93902f6331b654eb4d1f3780f2d9
BLAKE2b-256 765412081604b554c7d9a37b09c0f2d11c092baeb77f11a0cc3a84b987bfd6cc

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