Showing 41 of 121 total issues
Function create_multidim_plot
has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring. Open
def create_multidim_plot(parameters, samples, labels=None, mins=None, maxs=None, expected_parameters=None, expected_parameters_color='r', plot_marginal=True, plot_scatter=True, marginal_percentiles=None, contour_percentiles=None,
- Read upRead up
File emcee.py
has 765 lines of code (exceeds 500 allowed). Consider refactoring. Open
# Copyright (C) 2016 Collin Capano# This program is free software; you can redistribute it and/or modify it# under the terms of the GNU General Public License as published by the# Free Software Foundation; either version 3 of the License, or (at your# option) any later version.
File base.py
has 749 lines of code (exceeds 500 allowed). Consider refactoring. Open
# Copyright (C) 2016 Christopher M. Biwer, Collin Capano# This program is free software; you can redistribute it and/or modify it# under the terms of the GNU General Public License as published by the# Free Software Foundation; either version 3 of the License, or (at your# option) any later version.
File hdf.py
has 647 lines of code (exceeds 500 allowed). Consider refactoring. Open
# Copyright (C) 2016 Christopher M. Biwer# This program is free software; you can redistribute it and/or modify it# under the terms of the GNU General Public License as published by the# Free Software Foundation; either version 3 of the License, or (at your# self.option) any later version.
File option_utils.py
has 630 lines of code (exceeds 500 allowed). Consider refactoring. Open
# Copyright (C) 2016 Collin Capano## This program is free software; you can redistribute it and/or modify it# under the terms of the GNU General Public License as published by the# Free Software Foundation; either version 3 of the License, or (at your
File scatter_histograms.py
has 601 lines of code (exceeds 500 allowed). Consider refactoring. Open
# Copyright (C) 2016 Miriam Cabero Mueller, Collin Capano## This program is free software; you can redistribute it and/or modify it# under the terms of the GNU General Public License as published by the# Free Software Foundation; either version 3 of the License, or (at your
Function create_marginalized_hist
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def create_marginalized_hist(ax, values, label, percentiles=None, color='k', fillcolor='gray', linecolor='navy', title=True, expected_value=None, expected_color='red', rotated=False, plot_min=None, plot_max=None):
- Read upRead up
Function create_axes_grid
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def create_axes_grid(parameters, labels=None, height_ratios=None, width_ratios=None, no_diagonals=False): """Given a list of parameters, creates a figure with an axis for every possible combination of the parameters.
- Read upRead up
File base.py
has 567 lines of code (exceeds 500 allowed). Consider refactoring. Open
# Copyright (C) 2016 Collin Capano# This program is free software; you can redistribute it and/or modify it# under the terms of the GNU General Public License as published by the# Free Software Foundation; either version 3 of the License, or (at your# option) any later version.
Function compute_acfs
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def compute_acfs(cls, fp, start_index=None, end_index=None, per_walker=False, walkers=None, parameters=None, temps=None): """Computes the autocorrleation function of the model params in the given file.
- Read upRead up
Function create_density_plot
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def create_density_plot(xparam, yparam, samples, plot_density=True, plot_contours=True, percentiles=None, cmap='viridis', contour_color=None, xmin=None, xmax=None, ymin=None, ymax=None, exclude_region=None, fig=None, ax=None, use_kombine=False):
- Read upRead up
Function _read_fields
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def _read_fields(fp, fields_group, fields, array_class, thin_start=None, thin_interval=None, thin_end=None, iteration=None, temps=None, walkers=None, flatten=True): """Base function for reading samples and model stats. See `read_samples` and `read_model_stats` for details.
- Read upRead up
Function create_multidim_plot
has 27 arguments (exceeds 10 allowed). Consider refactoring. Open
def create_multidim_plot(parameters, samples, labels=None,
Function results_from_cli
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def results_from_cli(opts, load_samples=True, **kwargs): """ Loads an inference result file along with any labels associated with it from the command line options.
- Read upRead up
Function write_metadata
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def write_metadata(self, fp, **kwargs): """Writes metadata about this sampler to the given file. Metadata is written to the file's `attrs`. Parameters
- Read upRead up
Function data_from_cli
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def data_from_cli(opts): """Loads the data needed for a model from the given command-line options. Gates specifed on the command line are also applied. Parameters
- Read upRead up
Function write_samples_group
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def write_samples_group(fp, samples_group, parameters, samples, start_iteration=None, max_iterations=None): """Writes samples to the given file. Results are written to:
- Read upRead up
Function write_samples_group
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def write_samples_group(fp, samples_group, parameters, samples, start_iteration=None, max_iterations=None): """Writes samples to the given file. Results are written to:
- Read upRead up
Function validate_checkpoint_files
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def validate_checkpoint_files(checkpoint_file, backup_file): """Checks if the given checkpoint and/or backup files are valid. The checkpoint file is considered valid if:
- Read upRead up
Function create_density_plot
has 16 arguments (exceeds 10 allowed). Consider refactoring. Open
def create_density_plot(xparam, yparam, samples, plot_density=True,