scikit-rf runs into problems when trying the example code.

24 views
Skip to first unread message

Paul Klasmann

unread,
Nov 7, 2022, 3:40:59 PM11/7/22
to scikit-rf
I get similar problems on Win10 and on the Raspberry Pi when trying to run:

import skrf as rf
ntwk = rf.Network('ring slot.s2p')
ntwk.plot_s_smith()

Scikit-rf seemed to install fine with pip.  I hop that someone can help to point out the issue.  Thank you.

The errors from athe RPI are:
%Run scikit_rf_TEST1.py
Traceback (most recent call last):
  File "/home/pi/mu_code/scikit_rf_TEST1.py", line 1, in <module>
    import skrf as rf
  File "/home/pi/.local/lib/python3.9/site-packages/skrf/__init__.py", line 12, in <module>
    from . import network
  File "/home/pi/.local/lib/python3.9/site-packages/skrf/network.py", line 176, in <module>
    from scipy import stats, signal  # for Network.add_noise_*, and Network.windowed
  File "/home/pi/.local/lib/python3.9/site-packages/scipy/stats/__init__.py", line 453, in <module>
    from ._stats_py import *
  File "/home/pi/.local/lib/python3.9/site-packages/scipy/stats/_stats_py.py", line 38, in <module>
    from scipy.spatial.distance import cdist
  File "/home/pi/.local/lib/python3.9/site-packages/scipy/spatial/__init__.py", line 102, in <module>
    from ._kdtree import *
  File "/home/pi/.local/lib/python3.9/site-packages/scipy/spatial/_kdtree.py", line 5, in <module>
    from ._ckdtree import cKDTree, cKDTreeNode
  File "_ckdtree.pyx", line 1, in init scipy.spatial._ckdtree
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 48 from C header, got 40 from PyObject

Julien Hillairet

unread,
Nov 8, 2022, 1:00:38 AM11/8/22
to scik...@googlegroups.com
Dear Paul,

It seems the error originates from scipy. What happen if you type the following in the python shell?

from scipy import stats, signal

Julien

--
You received this message because you are subscribed to the Google Groups "scikit-rf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scikit-rf+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scikit-rf/45d5f8f0-10fc-417d-a762-1e8b923460bfn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages