Showing 33 of 33 total issues
Function range
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const range = (...args: number[]): NDArray => {
const type: TypedArrayConstructor = Float64Array;
let backwards: boolean = false;
let start: number;
let step: number;
- Read upRead up
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
Function gemm
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export function gemm(
dtype: DType,
transx: number,
transy: number,
m: number,
- Read upRead up
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
Function default
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function (this: NDArray, x: NDArray | ArrayLike<any>): NDArray {
const [r1, c1] = this.shape;
const [r2, c2] = array(x).shape;
const { data: d1 } = this;
const { data: d2 } = array(x);
- Read upRead up
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
Function default
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function (this: NDArray): NDArray {
this.square();
const {
shape: [n],
- Read upRead up
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
Function default
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function (
this: NDArray,
begin: number = 0,
end: number = this.shape[0],
step: number = 1
- Read upRead up
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
Function axpy
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
dtype: DType,
n: number,
alpha: number,
x: TypedArray,
inc_x: number,
Function dot
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
dtype: DType,
n: number,
x: TypedArray,
inc_x: number,
y: TypedArray,
Function getrf
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
dtype: DType,
m: number,
n: number,
x: TypedArray,
ldx: number,
Function scal
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function scal(dtype: DType, n: number, alpha: number, x: TypedArray, inc_x: number) {
Function getri
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function getri(dtype: DType, n: number, x: TypedArray, ldx: number, ipiv: Int32Array) {
Function default
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export default function (this: NDArray, x: NDArray): NDArray {
// TODO: compare strides instead of blind copy
const {
shape: [r1, c1],
data: d1,
- Read upRead up
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
Function default
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export default function (this: NDArray): [NDArray, NDArray, Int32Array] {
const [LU, ipiv] = this.copy().lu_factor();
const L = LU.copy();
const U = LU.copy();
const { data: d1 } = L;
- Read upRead up
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
Function default
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function (this: NDArray): number {
const { data: d1, length: l1, strides: st1, dtype } = this;
let max: number = Number.NEGATIVE_INFINITY;
try {
- Read upRead up
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"