I am using the ltspice python package to extract the data from the .raw file as seen in this link. However, when I try to apply it to my raw file I get the following error:

*Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python37\lib\site-packages\ltspice\ltspice.py", line 98, in parse
    self.data_raw = np.reshape(np.array(self.data_raw), (self._point_num, self._variable_num + 1))
  File "<__array_function__ internals>", line 6, in reshape
  File "C:\Python37\lib\site-packages\numpy\core\fromnumeric.py", line 301, in reshape
    return _wrapfunc(a, 'reshape', newshape, order=order)
  File "C:\Python37\lib\site-packages\numpy\core\fromnumeric.py", line 61, in _wrapfunc
    return bound(*args, **kwds)
ValueError: cannot reshape array of size 0 into shape (1746,33)*

Any suggestions on how to solve the problem?

  • \$\begingroup\$ Best ask the creators of that package. This has very little to do with electronics. \$\endgroup\$ – a concerned citizen Oct 21 '20 at 15:07
  • \$\begingroup\$ Will do, thank you! \$\endgroup\$ – Wallflower Oct 22 '20 at 6:44

After some research I ended up finding the solution. The ltspice package for python should be updated. To anyone dealing with the same problem, better change the ltspice.py file with the one found here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.