The Siemens Community Catalyst program was co-created with our community to acknowledge technology leaders who consistently contribute to the Siemens Community. Nominations are accepted on a rolling basis.
Hi,
I'm trying to calculate a matrix using this python block, and while the same code works on python, it does not work here. Is numpy arrays not supported?
The error message says:
Hi Linn,
vssGetInputData will import the data as an an ndarray. Therefore, adding [0,0] at the end of lines 8 to 14, like this:
a1 = apis.vssGetInputData(block,5)[0,0]
Should give you the floats you need.
Also, make sure the output size is correct in the Ports tab of the block. In this case, I believe it should be a 4x4 matrix, right?
Rafael
Wow, thanks alot! And you even replicated it in the twin activate :O I guess in my next question I could leave a file instead of screenshots.
Join us for a community conversation on how High-Performance Computing (HPC) and Simcenter PSIM work together to meet the increasing demands of modern power electronics simulation. During this one-hour technical session, you'll discover how leveraging HPC can speed up simulations, improve scalability, and empower engineers…
Join us for a community conversation on accelerating your motor simulation workflow with Simcenter Simlab. In this beginner-friendly session, we'll introduce the platform's automated model-building capabilities and show how easy it is to set up your first electric motor analysis. You'll see the basic steps of geometry…
Join us for a Community Conversation where we'll discuss practical approaches to analyzing complex electromagnetic models using hybrid solver techniques. This session will provide a general overview of how different computational methods can be combined within a single simulation to address models containing varied…