def test_all_fit_attributes_dict(lengths, _): """ Test describe_powerlaw_fit. """ fit = length_distributions.determine_fit(lengths) result = length_distributions.all_fit_attributes_dict(fit) assert isinstance(result, dict)
def automatic_fit(self) -> powerlaw.Fit: """ Get automatic powerlaw Fit. """ if self._automatic_fit is None: self._automatic_fit = length_distributions.determine_fit( self.length_array) return self._automatic_fit
def test_describe_powerlaw_fit(lengths, label): """ Test describe_powerlaw_fit. """ fit = length_distributions.determine_fit(lengths) result = length_distributions.describe_powerlaw_fit(fit=fit, label=label, length_array=lengths) assert isinstance(result, dict)
def determine_manual_fit(self, cut_off: float) -> powerlaw.Fit: """ Get manually determined Fit with set cut off. """ return length_distributions.determine_fit(self.length_array, cut_off=cut_off)
def test_determine_fit(length_array: np.ndarray, cut_off: float): """ Test determine_fit. """ fit = length_distributions.determine_fit(length_array, cut_off) assert isinstance(fit, powerlaw.Fit)