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.0.6.tar.gz (25.4 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.0.6-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pydspace-0.0.6.tar.gz
Algorithm Hash digest
SHA256 1ec70f3d5fc786ecd39a38fcdf9da26e52ad242a153422f1069bdc73be1596ca
MD5 361ad0925654348aaacfb6f175d11a21
BLAKE2b-256 87f14470b6976d88a1e27ffd46fbc5460730f5eb031074b326ea1701b49bc63c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pydspace-0.0.6-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.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 090f6d315ab315ab3c271e878739189ac083ca2194d332b485c0c0c354a93e78
MD5 82fb38ab41980aceb75df94f5acb8286
BLAKE2b-256 c73704c2da0c009b06724224c3113e65fe41a9cc83d5f6f8fb732642be219536

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