dseuss/mpnum

View on GitHub
mpnum/factory.py

Summary

Maintainability
C
7 hrs
Test Coverage

File factory.py has 322 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# encoding: utf-8
"""Module to create random test instances of matrix product arrays"""

from __future__ import division, print_function

Severity: Minor
Found in mpnum/factory.py - About 3 hrs to fix

    Function random_mpa has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def random_mpa(sites, ldim, rank, randstate=None, normalized=False,
    Severity: Major
    Found in mpnum/factory.py - About 50 mins to fix

      Function random_mpo has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def random_mpo(sites, ldim, rank, randstate=None, hermitian=False,
      Severity: Major
      Found in mpnum/factory.py - About 50 mins to fix

        Function _random_op has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def _random_op(sites, ldim, hermitian=False, normalized=False, randstate=None,
        Severity: Minor
        Found in mpnum/factory.py - About 45 mins to fix

          Function random_mps has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def random_mps(sites, ldim, rank, randstate=None, force_rank=False):
          Severity: Minor
          Found in mpnum/factory.py - About 35 mins to fix

            Function _generate has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def _generate(sites, ldim, rank, func, force_rank):
            Severity: Minor
            Found in mpnum/factory.py - About 35 mins to fix

              There are no issues that match your filters.

              Category
              Status