ValueError Traceback (most recent call last)
Input In [20], in <cell line: 1>()
----> 1 params = plr.parameters()
2 params
File ~\anaconda3\lib\site-packages\pyplr\plr.py:255, in PLR.parameters(self)
228 def parameters(self) -> pd.DataFrame:
229 """Collapse a PLR into descriptive parameters.
230
231 Parameters
(...)
243 DataFrame containins the params.
244 """
246 params = {
247 'Baseline': self.baseline(),
248 'Latency_a': self.latency_to_constriction_a(),
249 'Latency_b': self.latency_to_constriction_b(),
250 'T2MaxVel': self.time_to_max_velocity(),
251 'T2MaxCon': self.time_to_max_constriction(),
252 'T2Rec75pc': self.time_to_75pc_recovery(),
253 'PeakCon': self.peak_constriction(),
254 'ConAmplitude': self.constriction_amplitude(),
--> 255 'VelConMax': self.max_constriction_velocity(),
256 'VelConAve': self.average_constriction_velocity(),
257 'AccConMax': self.max_constriction_acceleration(),
258 'ConTime': self.constriction_time(),
259 'VelRedAve': self.average_redilation_velocity(),
260 'VelRedMax': self.max_redilation_velocity(),
261 'AccRedMax': self.max_redilation_acceleration()
262 }
263 return pd.DataFrame.from_dict(
264 params, orient='index', columns=['value'])
File ~\anaconda3\lib\site-packages\pyplr\plr.py:175, in PLR.max_constriction_velocity(self)
173 vel = self.velocity_profile()
174 pidx = self.peak_constriction_idx()
--> 175 return np.max(abs(vel[self.onset_idx:pidx]))
File <array_function internals>:5, in amax(*args, **kwargs)
File ~\anaconda3\lib\site-packages\numpy\core\fromnumeric.py:2754, in amax(a, axis, out, keepdims, initial, where)
2638 @array_function_dispatch(_amax_dispatcher)
2639 def amax(a, axis=None, out=None, keepdims=np._NoValue, initial=np._NoValue,
2640 where=np._NoValue):
2641 """
2642 Return the maximum of an array or maximum along an axis.
2643
(...)
2752 5
2753 """
-> 2754 return _wrapreduction(a, np.maximum, 'max', axis, None, out,
2755 keepdims=keepdims, initial=initial, where=where)
File ~\anaconda3\lib\site-packages\numpy\core\fromnumeric.py:86, in _wrapreduction(obj, ufunc, method, axis, dtype, out, **kwargs)
83 else:
84 return reduction(axis=axis, out=out, **passkwargs)
---> 86 return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation maximum which has no identity