tensorflow/tensorflow

View on GitHub
tensorflow/python/ops/math_ops.py

Summary

Maintainability
F
2 wks
Test Coverage

File math_ops.py has 4447 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Severity: Major
Found in tensorflow/python/ops/math_ops.py - About 1 wk to fix

    Function matmul has 12 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def matmul(
    Severity: Major
    Found in tensorflow/python/ops/math_ops.py - About 1 hr to fix

      Function count_nonzero has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def count_nonzero(input_tensor=None,
      Severity: Major
      Found in tensorflow/python/ops/math_ops.py - About 1 hr to fix

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

        def matvec(a,
        Severity: Major
        Found in tensorflow/python/ops/math_ops.py - About 50 mins to fix

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

          def sparse_segment_sqrt_n_v2(
          Severity: Minor
          Found in tensorflow/python/ops/math_ops.py - About 45 mins to fix

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

            def sparse_segment_sqrt_n(
            Severity: Minor
            Found in tensorflow/python/ops/math_ops.py - About 45 mins to fix

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

              def sparse_segment_mean(
              Severity: Minor
              Found in tensorflow/python/ops/math_ops.py - About 45 mins to fix

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

                def reduce_any_v1(input_tensor,
                Severity: Minor
                Found in tensorflow/python/ops/math_ops.py - About 45 mins to fix

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

                  def sparse_segment_sum(
                  Severity: Minor
                  Found in tensorflow/python/ops/math_ops.py - About 45 mins to fix

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

                    def reduce_prod_v1(input_tensor,
                    Severity: Minor
                    Found in tensorflow/python/ops/math_ops.py - About 45 mins to fix

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

                      def reduce_logsumexp_v1(input_tensor,
                      Severity: Minor
                      Found in tensorflow/python/ops/math_ops.py - About 45 mins to fix

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

                        def sparse_segment_mean_v2(
                        Severity: Minor
                        Found in tensorflow/python/ops/math_ops.py - About 45 mins to fix

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

                          def reduce_sum_v1(input_tensor,
                          Severity: Minor
                          Found in tensorflow/python/ops/math_ops.py - About 45 mins to fix

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

                            def reduce_min_v1(input_tensor,
                            Severity: Minor
                            Found in tensorflow/python/ops/math_ops.py - About 45 mins to fix

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

                              def sparse_segment_sum_v2(
                              Severity: Minor
                              Found in tensorflow/python/ops/math_ops.py - About 45 mins to fix

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

                                def reduce_all_v1(input_tensor,
                                Severity: Minor
                                Found in tensorflow/python/ops/math_ops.py - About 45 mins to fix

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

                                  def count_nonzero_v2(
                                  Severity: Minor
                                  Found in tensorflow/python/ops/math_ops.py - About 45 mins to fix

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

                                    def reduce_mean_v1(input_tensor,
                                    Severity: Minor
                                    Found in tensorflow/python/ops/math_ops.py - About 45 mins to fix

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

                                      def reduce_max_v1(input_tensor,
                                      Severity: Minor
                                      Found in tensorflow/python/ops/math_ops.py - About 45 mins to fix

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

                                        def argmax(input,
                                        Severity: Minor
                                        Found in tensorflow/python/ops/math_ops.py - About 35 mins to fix

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

                                          def linspace_nd(start, stop, num, name=None, axis=0):
                                          Severity: Minor
                                          Found in tensorflow/python/ops/math_ops.py - About 35 mins to fix

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

                                            def reduce_max_with_dims(input_tensor,
                                            Severity: Minor
                                            Found in tensorflow/python/ops/math_ops.py - About 35 mins to fix

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

                                              def sobol_sample(dim, num_results, skip=0, dtype=dtypes.float32, name=None):
                                              Severity: Minor
                                              Found in tensorflow/python/ops/math_ops.py - About 35 mins to fix

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

                                                def argmin(input,
                                                Severity: Minor
                                                Found in tensorflow/python/ops/math_ops.py - About 35 mins to fix

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

                                                  def range(start, limit=None, delta=1, dtype=None, name="range"):  # pylint: disable=redefined-builtin
                                                  Severity: Minor
                                                  Found in tensorflow/python/ops/math_ops.py - About 35 mins to fix

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

                                                    def cumsum(x, axis=0, exclusive=False, reverse=False, name=None):
                                                    Severity: Minor
                                                    Found in tensorflow/python/ops/math_ops.py - About 35 mins to fix

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

                                                      def cumulative_logsumexp(x, axis=0, exclusive=False, reverse=False, name=None):
                                                      Severity: Minor
                                                      Found in tensorflow/python/ops/math_ops.py - About 35 mins to fix

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

                                                        def reduce_sum_with_dims(input_tensor,
                                                        Severity: Minor
                                                        Found in tensorflow/python/ops/math_ops.py - About 35 mins to fix

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

                                                          def cumprod(x, axis=0, exclusive=False, reverse=False, name=None):
                                                          Severity: Minor
                                                          Found in tensorflow/python/ops/math_ops.py - About 35 mins to fix

                                                            Function divide has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                            Open

                                                            def divide(x, y, name=None):
                                                              """Computes Python style division of `x` by `y`.
                                                            
                                                              For example:
                                                            
                                                            
                                                            Severity: Minor
                                                            Found in tensorflow/python/ops/math_ops.py - About 35 mins to fix

                                                            Cognitive Complexity

                                                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                            A method's cognitive complexity is based on a few simple rules:

                                                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                            • Code is considered more complex for each "break in the linear flow of the code"
                                                            • Code is considered more complex when "flow breaking structures are nested"

                                                            Further reading

                                                            There are no issues that match your filters.

                                                            Category
                                                            Status