Hello,
I recently updated Python and Pylinac to 3.8.1 and 3.0.1, respectively. After the update I get the following error for every run of this module, including the demo run:
PicketFence.run_demo()
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\felipe.barreto\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pylinac\picketfence.py”, line 226, in run_demo
pf.analyze(tolerance, action_tolerance=action_tolerance)
File “C:\Users\felipe.barreto\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pylinac\picketfence.py”, line 298, in analyze
self.pickets = PicketManager(self.image, self.settings, num_pickets)
File “C:\Users\felipe.barreto\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pylinac\picketfence.py”, line 608, in init
self.find_pickets()
File “C:\Users\felipe.barreto\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pylinac\picketfence.py”, line 640, in find_pickets
self.pickets.append(Picket(self.image, self.settings, peak_idx, peak_spacing/2))
File “C:\Users\felipe.barreto\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pylinac\picketfence.py”, line 683, in init
self._get_mlc_positions()
File “C:\Users\felipe.barreto\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pylinac\picketfence.py”, line 690, in _get_mlc_positions
mlc_position = self.find_mlc_peak(mlc_center)
File “C:\Users\felipe.barreto\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pylinac\picketfence.py”, line 704, in find_mlc_peak
pix_vals = np.median(self.picket_array[:, mlc_rows], axis=1)
File “C:\Users\felipe.barreto\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pylinac\picketfence.py”, line 740, in picket_array
top_edge = int(self.approximate_idx - self.spacing)
TypeError: only size-1 arrays can be converted to Python scalars
Does anyone have an insight regarding this error?
Thanks in advance,
Felipe.