Support sparse array

Open
#60 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
matlab, python
Domain
api

Research direction

Start by reproducing the reported failure with start_instance(engine="matlab") and m.runpf(), using the matpower-pip example and the MATLAB sparse-array error as the entry point. Compare the MATLAB engine path with the existing Oct2Py behavior and verify that sparse results are returned in a scipy-compatible representation without breaking dense data handling.

Written by the indexing model from the issue text.

Description

Hi, I'm a matpower-pip maintainer. It currently fully support MATPOWER via octave and Oct2Py. I just got access to genuine MATLAB engine and test my package on it. Turns out, you didn't support sparse data.

TypeError: conversion of MATLAB sparse array to Python not supported

I suggest that you use scipy representation to support sparse: https://docs.scipy.org/doc/scipy/reference/sparse.html


Hopefully, we can do at least this in Python

from matpower import start_instance

m = start_instance(engine="matlab")
m.runpf()
Dominant language
Python
Stars
97
Forks
13
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mathworks/matlab-engine-for-python

All issues in mathworks/matlab-engine-for-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.