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

Skip to first unread message

Paul Klasmann

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')

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:
Traceback (most recent call last):
  File "/home/pi/mu_code/", line 1, in <module>
    import skrf as rf
  File "/home/pi/.local/lib/python3.9/site-packages/skrf/", line 12, in <module>
    from . import network
  File "/home/pi/.local/lib/python3.9/site-packages/skrf/", 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/", line 453, in <module>
    from ._stats_py import *
  File "/home/pi/.local/lib/python3.9/site-packages/scipy/stats/", line 38, in <module>
    from scipy.spatial.distance import cdist
  File "/home/pi/.local/lib/python3.9/site-packages/scipy/spatial/", line 102, in <module>
    from ._kdtree import *
  File "/home/pi/.local/lib/python3.9/site-packages/scipy/spatial/", 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

Nov 8, 2022, 1:00:38 AM11/8/22
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


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
To view this discussion on the web visit
Reply all
Reply to author
0 new messages