dss-extensions / DSS-Python

Native, "direct" Python bindings (interface) and misc tools for a custom implementation of OpenDSS (EPRI Distribution System Simulator). Based on CFFI, DSS C-API, aiming for full COM API-level compatibility on Windows, Linux and MacOS, while providing various extensions.
https://dss-extensions.org/DSS-Python/
BSD 3-Clause "New" or "Revised" License
60 stars 4 forks source link

Map complex rectangular values to native/numpy complex numbers #28

Closed PMeira closed 1 year ago

PMeira commented 2 years ago

As a note, the new API already handles complex and enums, and reshapes matrices. We still need to decide how to handle this in the classic API based on COM, and ODD.py. Maybe we should create a separate module for the next incarnation to start with a clean slate.

PMeira commented 2 years ago

We could add the option to return complex numbers and arrays in the current COM-like class organization, but only toggle that by default in a later version.

And enriching the COM version even further (with our dss.patch_dss_com) is a good alternative. That way, we can test without having to worry about that. Since only a couple of wrapper functions are required, it may be possible!

PMeira commented 1 year ago

Implemented and tested, coming in the next release soon.