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.5.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.5-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pydspace-0.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 821be8c12ea8a90902ff343702af811aefb6defce1441dd79dfb8f1e9dfe6615
MD5 0f208e910b772c0cb43d63881265e25c
BLAKE2b-256 d632ac551ab659726794a41e913a0566bcd240082e76c030743b00eb3f9335cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pydspace-0.0.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c2b4b00e2cb26e418c7fdd3beef06bef864c6725b8350bbea8c5d9f174946af1
MD5 46ca34f54b1b703bf9de66dd30efe107
BLAKE2b-256 b09b75926eb149f9f26d4a01b244712a163696518960f7230e85b5fe3cc356c9

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