The following issues were found

numpy/typing/tests/data/reveal/flatiter.py
14 issues
Value 'np.ndarray' is unsubscriptable
Error

Line: 4 Column: 16

              from typing import Any
import numpy as np

a: np.flatiter[np.ndarray[Any, np.dtype[np.str_]]]

reveal_type(a.base)  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a.copy())  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a.coords)  # E: tuple[builtins.int]
reveal_type(a.index)  # E: int

            

Reported by Pylint.

Undefined variable 'reveal_type'
Error

Line: 6 Column: 1

              
a: np.flatiter[np.ndarray[Any, np.dtype[np.str_]]]

reveal_type(a.base)  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a.copy())  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a.coords)  # E: tuple[builtins.int]
reveal_type(a.index)  # E: int
reveal_type(iter(a))  # E: Iterator[numpy.str_]
reveal_type(next(a))  # E: numpy.str_

            

Reported by Pylint.

Undefined variable 'reveal_type'
Error

Line: 7 Column: 1

              a: np.flatiter[np.ndarray[Any, np.dtype[np.str_]]]

reveal_type(a.base)  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a.copy())  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a.coords)  # E: tuple[builtins.int]
reveal_type(a.index)  # E: int
reveal_type(iter(a))  # E: Iterator[numpy.str_]
reveal_type(next(a))  # E: numpy.str_
reveal_type(a[0])  # E: numpy.str_

            

Reported by Pylint.

Undefined variable 'reveal_type'
Error

Line: 8 Column: 1

              
reveal_type(a.base)  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a.copy())  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a.coords)  # E: tuple[builtins.int]
reveal_type(a.index)  # E: int
reveal_type(iter(a))  # E: Iterator[numpy.str_]
reveal_type(next(a))  # E: numpy.str_
reveal_type(a[0])  # E: numpy.str_
reveal_type(a[[0, 1, 2]])  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]

            

Reported by Pylint.

Undefined variable 'reveal_type'
Error

Line: 9 Column: 1

              reveal_type(a.base)  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a.copy())  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a.coords)  # E: tuple[builtins.int]
reveal_type(a.index)  # E: int
reveal_type(iter(a))  # E: Iterator[numpy.str_]
reveal_type(next(a))  # E: numpy.str_
reveal_type(a[0])  # E: numpy.str_
reveal_type(a[[0, 1, 2]])  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a[...])  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]

            

Reported by Pylint.

Undefined variable 'reveal_type'
Error

Line: 10 Column: 1

              reveal_type(a.copy())  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a.coords)  # E: tuple[builtins.int]
reveal_type(a.index)  # E: int
reveal_type(iter(a))  # E: Iterator[numpy.str_]
reveal_type(next(a))  # E: numpy.str_
reveal_type(a[0])  # E: numpy.str_
reveal_type(a[[0, 1, 2]])  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a[...])  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a[:])  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]

            

Reported by Pylint.

Undefined variable 'reveal_type'
Error

Line: 11 Column: 1

              reveal_type(a.coords)  # E: tuple[builtins.int]
reveal_type(a.index)  # E: int
reveal_type(iter(a))  # E: Iterator[numpy.str_]
reveal_type(next(a))  # E: numpy.str_
reveal_type(a[0])  # E: numpy.str_
reveal_type(a[[0, 1, 2]])  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a[...])  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a[:])  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a.__array__())  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]

            

Reported by Pylint.

Undefined variable 'reveal_type'
Error

Line: 12 Column: 1

              reveal_type(a.index)  # E: int
reveal_type(iter(a))  # E: Iterator[numpy.str_]
reveal_type(next(a))  # E: numpy.str_
reveal_type(a[0])  # E: numpy.str_
reveal_type(a[[0, 1, 2]])  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a[...])  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a[:])  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a.__array__())  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a.__array__(np.dtype(np.float64)))  # E: numpy.ndarray[Any, numpy.dtype[{float64}]]

            

Reported by Pylint.

Undefined variable 'reveal_type'
Error

Line: 13 Column: 1

              reveal_type(iter(a))  # E: Iterator[numpy.str_]
reveal_type(next(a))  # E: numpy.str_
reveal_type(a[0])  # E: numpy.str_
reveal_type(a[[0, 1, 2]])  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a[...])  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a[:])  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a.__array__())  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a.__array__(np.dtype(np.float64)))  # E: numpy.ndarray[Any, numpy.dtype[{float64}]]

            

Reported by Pylint.

Undefined variable 'reveal_type'
Error

Line: 14 Column: 1

              reveal_type(next(a))  # E: numpy.str_
reveal_type(a[0])  # E: numpy.str_
reveal_type(a[[0, 1, 2]])  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a[...])  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a[:])  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a.__array__())  # E: numpy.ndarray[Any, numpy.dtype[numpy.str_]]
reveal_type(a.__array__(np.dtype(np.float64)))  # E: numpy.ndarray[Any, numpy.dtype[{float64}]]

            

Reported by Pylint.

numpy/typing/tests/data/pass/arrayterator.py
14 issues
Value 'np.ndarray' is unsubscriptable
Error

Line: 7 Column: 8

              from typing import Any
import numpy as np

AR_i8: np.ndarray[Any, np.dtype[np.int_]] = np.arange(10)
ar_iter = np.lib.Arrayterator(AR_i8)

ar_iter.var
ar_iter.buf_size
ar_iter.start

            

Reported by Pylint.

Statement seems to have no effect
Error

Line: 10 Column: 1

              AR_i8: np.ndarray[Any, np.dtype[np.int_]] = np.arange(10)
ar_iter = np.lib.Arrayterator(AR_i8)

ar_iter.var
ar_iter.buf_size
ar_iter.start
ar_iter.stop
ar_iter.step
ar_iter.shape

            

Reported by Pylint.

Statement seems to have no effect
Error

Line: 11 Column: 1

              ar_iter = np.lib.Arrayterator(AR_i8)

ar_iter.var
ar_iter.buf_size
ar_iter.start
ar_iter.stop
ar_iter.step
ar_iter.shape
ar_iter.flat

            

Reported by Pylint.

Statement seems to have no effect
Error

Line: 12 Column: 1

              
ar_iter.var
ar_iter.buf_size
ar_iter.start
ar_iter.stop
ar_iter.step
ar_iter.shape
ar_iter.flat


            

Reported by Pylint.

Statement seems to have no effect
Error

Line: 13 Column: 1

              ar_iter.var
ar_iter.buf_size
ar_iter.start
ar_iter.stop
ar_iter.step
ar_iter.shape
ar_iter.flat

ar_iter.__array__()

            

Reported by Pylint.

Statement seems to have no effect
Error

Line: 14 Column: 1

              ar_iter.buf_size
ar_iter.start
ar_iter.stop
ar_iter.step
ar_iter.shape
ar_iter.flat

ar_iter.__array__()


            

Reported by Pylint.

Statement seems to have no effect
Error

Line: 15 Column: 1

              ar_iter.start
ar_iter.stop
ar_iter.step
ar_iter.shape
ar_iter.flat

ar_iter.__array__()

for i in ar_iter:

            

Reported by Pylint.

Statement seems to have no effect
Error

Line: 16 Column: 1

              ar_iter.stop
ar_iter.step
ar_iter.shape
ar_iter.flat

ar_iter.__array__()

for i in ar_iter:
    pass

            

Reported by Pylint.

Statement seems to have no effect
Error

Line: 23 Column: 1

              for i in ar_iter:
    pass

ar_iter[0]
ar_iter[...]
ar_iter[:]
ar_iter[0, 0, 0]
ar_iter[..., 0, :]

            

Reported by Pylint.

Statement seems to have no effect
Error

Line: 24 Column: 1

                  pass

ar_iter[0]
ar_iter[...]
ar_iter[:]
ar_iter[0, 0, 0]
ar_iter[..., 0, :]

            

Reported by Pylint.

numpy/linalg/lapack_lite/f2c_s_lapack.c
14 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 2653 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  static integer ilo;
    static real dum[1], eps;
    static integer ibal;
    static char side[1];
    static real anrm;
    static integer ierr, itau, iwrk, nout;
    extern /* Subroutine */ int srot_(integer *, real *, integer *, real *,
	    integer *, real *, real *);
    extern doublereal snrm2_(integer *, real *, integer *);

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 7463 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  address a__1[2];
    integer h_dim1, h_offset, z_dim1, z_offset, i__1, i__2[2], i__3;
    real r__1;
    char ch__1[2];

    /* Local variables */
    static integer i__;
    static real hl[2401]	/* was [49][49] */;
    static integer kbot, nmin;

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 17322 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  static integer nibble;
    extern integer ilaenv_(integer *, char *, char *, integer *, integer *,
	    integer *, integer *, ftnlen, ftnlen);
    static char jbcmpz[2];
    extern /* Subroutine */ int slahqr_(logical *, logical *, integer *,
	    integer *, integer *, real *, integer *, real *, real *, integer *
	    , integer *, real *, integer *, integer *), slacpy_(char *,
	    integer *, integer *, real *, integer *, real *, integer *);
    static integer nwupbd;

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 19548 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  static integer nibble;
    extern integer ilaenv_(integer *, char *, char *, integer *, integer *,
	    integer *, integer *, ftnlen, ftnlen);
    static char jbcmpz[2];
    extern /* Subroutine */ int slahqr_(logical *, logical *, integer *,
	    integer *, integer *, real *, integer *, real *, real *, integer *
	    , integer *, real *, integer *, integer *), slacpy_(char *,
	    integer *, integer *, real *, integer *, real *, integer *);
    static integer nwupbd;

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 21497 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              	    integer *, real *, real *, integer *, real *, integer *);
    extern integer ilaslc_(integer *, integer *, real *, integer *), ilaslr_(
	    integer *, integer *, real *, integer *);
    static char transt[1];


/*
    -- LAPACK auxiliary routine (version 3.2) --
    -- LAPACK is a software package provided by Univ. of Tennessee,    --

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 34752 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  /* System generated locals */
    address a__1[2];
    integer a_dim1, a_offset, c_dim1, c_offset, i__1, i__2, i__3[2];
    char ch__1[2];

    /* Local variables */
    static integer i1, i2, nb, mi, ni, nq, nw;
    static logical left;
    extern logical lsame_(char *, char *);

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 34763 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  extern integer ilaenv_(integer *, char *, char *, integer *, integer *,
	    integer *, integer *, ftnlen, ftnlen);
    static logical notran, applyq;
    static char transt[1];
    extern /* Subroutine */ int sormlq_(char *, char *, integer *, integer *,
	    integer *, real *, integer *, real *, real *, integer *, real *,
	    integer *, integer *);
    static integer lwkopt;
    static logical lquery;

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 35081 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  /* System generated locals */
    address a__1[2];
    integer a_dim1, a_offset, c_dim1, c_offset, i__1[2], i__2;
    char ch__1[2];

    /* Local variables */
    static integer i1, i2, nb, mi, nh, ni, nq, nw;
    static logical left;
    extern logical lsame_(char *, char *);

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 35511 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  address a__1[2];
    integer a_dim1, a_offset, c_dim1, c_offset, i__1, i__2, i__3[2], i__4,
	    i__5;
    char ch__1[2];

    /* Local variables */
    static integer i__;
    static real t[4160]	/* was [65][64] */;
    static integer i1, i2, i3, ib, ic, jc, nb, mi, ni, nq, nw, iws;

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 35531 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              	    real *, integer *, real *, real *, integer *);
    static logical notran;
    static integer ldwork;
    static char transt[1];
    static integer lwkopt;
    static logical lquery;


/*

            

Reported by FlawFinder.

numpy/linalg/lapack_lite/f2c_c_lapack.c
14 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 1318 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  static real dum[1], eps;
    static complex tmp;
    static integer ibal;
    static char side[1];
    static real anrm;
    static integer ierr, itau, iwrk, nout;
    extern /* Subroutine */ int cscal_(integer *, complex *, complex *,
	    integer *);
    extern logical lsame_(char *, char *);

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 7963 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  integer h_dim1, h_offset, z_dim1, z_offset, i__1, i__2, i__3[2];
    real r__1, r__2, r__3;
    complex q__1;
    char ch__1[2];

    /* Local variables */
    static complex hl[2401]	/* was [49][49] */;
    static integer kbot, nmin;
    extern logical lsame_(char *, char *);

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 13846 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              	    integer *, integer *, complex *, integer *, complex *, integer *);
    extern integer ilaenv_(integer *, char *, char *, integer *, integer *,
	    integer *, integer *, ftnlen, ftnlen);
    static char jbcmpz[2];
    static complex rtdisc;
    static integer nwupbd;
    static logical sorted;
    static integer lwkopt;


            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 15960 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              	    integer *, integer *, complex *, integer *, complex *, integer *);
    extern integer ilaenv_(integer *, char *, char *, integer *, integer *,
	    integer *, integer *, ftnlen, ftnlen);
    static char jbcmpz[2];
    static complex rtdisc;
    static integer nwupbd;
    static logical sorted;
    static integer lwkopt;


            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 18391 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  extern integer ilaclc_(integer *, integer *, complex *, integer *);
    extern /* Subroutine */ int clacgv_(integer *, complex *, integer *);
    extern integer ilaclr_(integer *, integer *, complex *, integer *);
    static char transt[1];


/*
    -- LAPACK auxiliary routine (version 3.2) --
    -- LAPACK is a software package provided by Univ. of Tennessee,    --

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 25945 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  address a__1[2];
    integer a_dim1, a_offset, i__1, i__2, i__3[2], i__4, i__5;
    complex q__1;
    char ch__1[2];

    /* Local variables */
    static integer j, jb, nb, nn;
    extern logical lsame_(char *, char *);
    extern /* Subroutine */ int ctrmm_(char *, char *, char *, char *,

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 27913 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  /* System generated locals */
    address a__1[2];
    integer a_dim1, a_offset, c_dim1, c_offset, i__1, i__2, i__3[2];
    char ch__1[2];

    /* Local variables */
    static integer i1, i2, nb, mi, ni, nq, nw;
    static logical left;
    extern logical lsame_(char *, char *);

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 27931 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              	    integer *, complex *, integer *, complex *, complex *, integer *,
	    complex *, integer *, integer *);
    static logical applyq;
    static char transt[1];
    static integer lwkopt;
    static logical lquery;


/*

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 28253 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  /* System generated locals */
    address a__1[2];
    integer a_dim1, a_offset, c_dim1, c_offset, i__1[2], i__2;
    char ch__1[2];

    /* Local variables */
    static integer i1, i2, nb, mi, nh, ni, nq, nw;
    static logical left;
    extern logical lsame_(char *, char *);

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 28704 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  address a__1[2];
    integer a_dim1, a_offset, c_dim1, c_offset, i__1, i__2, i__3[2], i__4,
	    i__5;
    char ch__1[2];

    /* Local variables */
    static integer i__;
    static complex t[4160]	/* was [65][64] */;
    static integer i1, i2, i3, ib, ic, jc, nb, mi, ni, nq, nw, iws;

            

Reported by FlawFinder.

numpy/linalg/lapack_lite/f2c_d_lapack.c
14 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 2664 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  static integer ilo;
    static doublereal dum[1], eps;
    static integer ibal;
    static char side[1];
    static doublereal anrm;
    static integer ierr, itau;
    extern /* Subroutine */ int drot_(integer *, doublereal *, integer *,
	    doublereal *, integer *, doublereal *, doublereal *);
    static integer iwrk, nout;

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 7481 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  address a__1[2];
    integer h_dim1, h_offset, z_dim1, z_offset, i__1, i__2[2], i__3;
    doublereal d__1;
    char ch__1[2];

    /* Local variables */
    static integer i__;
    static doublereal hl[2401]	/* was [49][49] */;
    static integer kbot, nmin;

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 17390 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              	    integer *, doublereal *, integer *);
    extern integer ilaenv_(integer *, char *, char *, integer *, integer *,
	    integer *, integer *, ftnlen, ftnlen);
    static char jbcmpz[2];
    static integer nwupbd;
    static logical sorted;
    static integer lwkopt;



            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 19629 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              	    integer *, doublereal *, integer *);
    extern integer ilaenv_(integer *, char *, char *, integer *, integer *,
	    integer *, integer *, ftnlen, ftnlen);
    static char jbcmpz[2];
    static integer nwupbd;
    static logical sorted;
    static integer lwkopt;



            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 21576 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  static integer lastv;
    extern integer iladlc_(integer *, integer *, doublereal *, integer *),
	    iladlr_(integer *, integer *, doublereal *, integer *);
    static char transt[1];


/*
    -- LAPACK auxiliary routine (version 3.2) --
    -- LAPACK is a software package provided by Univ. of Tennessee,    --

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 34885 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  /* System generated locals */
    address a__1[2];
    integer a_dim1, a_offset, c_dim1, c_offset, i__1, i__2, i__3[2];
    char ch__1[2];

    /* Local variables */
    static integer i1, i2, nb, mi, ni, nq, nw;
    static logical left;
    extern logical lsame_(char *, char *);

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 34903 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              	    integer *, doublereal *, integer *, doublereal *, doublereal *,
	    integer *, doublereal *, integer *, integer *);
    static logical applyq;
    static char transt[1];
    static integer lwkopt;
    static logical lquery;


/*

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 35216 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  /* System generated locals */
    address a__1[2];
    integer a_dim1, a_offset, c_dim1, c_offset, i__1[2], i__2;
    char ch__1[2];

    /* Local variables */
    static integer i1, i2, nb, mi, nh, ni, nq, nw;
    static logical left;
    extern logical lsame_(char *, char *);

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 35647 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  address a__1[2];
    integer a_dim1, a_offset, c_dim1, c_offset, i__1, i__2, i__3[2], i__4,
	    i__5;
    char ch__1[2];

    /* Local variables */
    static integer i__;
    static doublereal t[4160]	/* was [65][64] */;
    static integer i1, i2, i3, ib, ic, jc, nb, mi, ni, nq, nw, iws;

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 35667 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              	    integer *, integer *, ftnlen, ftnlen);
    static logical notran;
    static integer ldwork;
    static char transt[1];
    static integer lwkopt;
    static logical lquery;


/*

            

Reported by FlawFinder.

numpy/linalg/lapack_lite/f2c_z_lapack.c
14 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 1320 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  static doublereal dum[1], eps;
    static doublecomplex tmp;
    static integer ibal;
    static char side[1];
    static doublereal anrm;
    static integer ierr, itau, iwrk, nout;
    extern logical lsame_(char *, char *);
    extern /* Subroutine */ int zscal_(integer *, doublecomplex *,
	    doublecomplex *, integer *), dlabad_(doublereal *, doublereal *);

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 8014 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  integer h_dim1, h_offset, z_dim1, z_offset, i__1, i__2, i__3[2];
    doublereal d__1, d__2, d__3;
    doublecomplex z__1;
    char ch__1[2];

    /* Local variables */
    static doublecomplex hl[2401]	/* was [49][49] */;
    static integer kbot, nmin;
    extern logical lsame_(char *, char *);

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 13914 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  static integer nibble;
    extern integer ilaenv_(integer *, char *, char *, integer *, integer *,
	    integer *, integer *, ftnlen, ftnlen);
    static char jbcmpz[2];
    static doublecomplex rtdisc;
    static integer nwupbd;
    static logical sorted;
    extern /* Subroutine */ int zlahqr_(logical *, logical *, integer *,
	    integer *, integer *, doublecomplex *, integer *, doublecomplex *,

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 16049 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  static integer nibble;
    extern integer ilaenv_(integer *, char *, char *, integer *, integer *,
	    integer *, integer *, ftnlen, ftnlen);
    static char jbcmpz[2];
    static doublecomplex rtdisc;
    static integer nwupbd;
    static logical sorted;
    extern /* Subroutine */ int zlahqr_(logical *, logical *, integer *,
	    integer *, integer *, doublecomplex *, integer *, doublecomplex *,

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 18494 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  extern /* Subroutine */ int zlacgv_(integer *, doublecomplex *, integer *)
	    ;
    extern integer ilazlr_(integer *, integer *, doublecomplex *, integer *);
    static char transt[1];


/*
    -- LAPACK auxiliary routine (version 3.2) --
    -- LAPACK is a software package provided by Univ. of Tennessee,    --

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 26062 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  address a__1[2];
    integer a_dim1, a_offset, i__1, i__2, i__3[2], i__4, i__5;
    doublecomplex z__1;
    char ch__1[2];

    /* Local variables */
    static integer j, jb, nb, nn;
    extern logical lsame_(char *, char *);
    static logical upper;

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 28039 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  /* System generated locals */
    address a__1[2];
    integer a_dim1, a_offset, c_dim1, c_offset, i__1, i__2, i__3[2];
    char ch__1[2];

    /* Local variables */
    static integer i1, i2, nb, mi, ni, nq, nw;
    static logical left;
    extern logical lsame_(char *, char *);

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 28050 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  extern integer ilaenv_(integer *, char *, char *, integer *, integer *,
	    integer *, integer *, ftnlen, ftnlen);
    static logical notran, applyq;
    static char transt[1];
    static integer lwkopt;
    static logical lquery;
    extern /* Subroutine */ int zunmlq_(char *, char *, integer *, integer *,
	    integer *, doublecomplex *, integer *, doublecomplex *,
	    doublecomplex *, integer *, doublecomplex *, integer *, integer *), zunmqr_(char *, char *, integer *, integer *,

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 28377 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  /* System generated locals */
    address a__1[2];
    integer a_dim1, a_offset, c_dim1, c_offset, i__1[2], i__2;
    char ch__1[2];

    /* Local variables */
    static integer i1, i2, nb, mi, nh, ni, nq, nw;
    static logical left;
    extern logical lsame_(char *, char *);

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 28828 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  address a__1[2];
    integer a_dim1, a_offset, c_dim1, c_offset, i__1, i__2, i__3[2], i__4,
	    i__5;
    char ch__1[2];

    /* Local variables */
    static integer i__;
    static doublecomplex t[4160]	/* was [65][64] */;
    static integer i1, i2, i3, ib, ic, jc, nb, mi, ni, nq, nw, iws;

            

Reported by FlawFinder.

numpy/core/src/common/numpyos.c
14 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 165 Column: 13 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

                      }
        else {
            memmove(p + insert_count, p, buffer + strlen(buffer) - p + 1);
            memcpy(p, chars_to_insert, insert_count);
        }
    }
}

/* see FORMATBUFLEN in unicodeobject.c */

            

Reported by FlawFinder.

strcpy - Does not check for buffer overflows when copying to destination [MS-banned]
Security

Line: 315 Column: 13 CWE codes: 120
Suggestion: Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused)

                          if (buf_size < 4) {                                         \
                return NULL;                                            \
            }                                                           \
            strcpy(buffer, "nan");                                      \
        }                                                               \
        else {                                                          \
            if (npy_signbit(val)) {                                     \
                if (buf_size < 5) {                                     \
                    return NULL;                                        \

            

Reported by FlawFinder.

strcpy - Does not check for buffer overflows when copying to destination [MS-banned]
Security

Line: 322 Column: 17 CWE codes: 120
Suggestion: Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused)

                              if (buf_size < 5) {                                     \
                    return NULL;                                        \
                }                                                       \
                strcpy(buffer, "-inf");                                 \
            }                                                           \
            else {                                                      \
                if (buf_size < 4) {                                     \
                    return NULL;                                        \
                }                                                       \

            

Reported by FlawFinder.

strcpy - Does not check for buffer overflows when copying to destination [MS-banned]
Security

Line: 328 Column: 17 CWE codes: 120
Suggestion: Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused)

                              if (buf_size < 4) {                                     \
                    return NULL;                                        \
                }                                                       \
                strcpy(buffer, "inf");                                  \
            }                                                           \
        }                                                               \
        return buffer;                                                  \
    }


            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 744 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              NPY_NO_EXPORT int
NumPyOS_ascii_ftolf(FILE *fp, double *value)
{
    char buffer[FLOAT_FORMATBUFLEN + 1];
    char *p;
    int r;

    r = read_numberlike_string(fp, buffer, FLOAT_FORMATBUFLEN+1);


            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 760 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              NPY_NO_EXPORT int
NumPyOS_ascii_ftoLf(FILE *fp, long double *value)
{
    char buffer[FLOAT_FORMATBUFLEN + 1];
    char *p;
    int r;

    r = read_numberlike_string(fp, buffer, FLOAT_FORMATBUFLEN+1);


            

Reported by FlawFinder.

strlen - Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected)
Security

Line: 155 Column: 26 CWE codes: 126

                      insert_count = 2;
    }
    if (insert_count) {
        size_t buf_len = strlen(buffer);
        if (buf_len + insert_count + 1 >= buf_size) {
            /*
             * If there is not enough room in the buffer
             * for the additional text, just skip it.  It's
             * not worth generating an error over.

            

Reported by FlawFinder.

strlen - Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected)
Security

Line: 164 Column: 51 CWE codes: 126

                           */
        }
        else {
            memmove(p + insert_count, p, buffer + strlen(buffer) - p + 1);
            memcpy(p, chars_to_insert, insert_count);
        }
    }
}


            

Reported by FlawFinder.

strlen - Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected)
Security

Line: 185 Column: 36 CWE codes: 126

                  const char *decimal_point = locale_data->decimal_point;

    if (decimal_point[0] != '.' || decimal_point[1] != 0) {
        size_t decimal_point_len = strlen(decimal_point);

        if (*buffer == '+' || *buffer == '-') {
            buffer++;
        }
        while (isdigit(Py_CHARMASK(*buffer))) {

            

Reported by FlawFinder.

strlen - Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected)
Security

Line: 198 Column: 35 CWE codes: 126

                          buffer++;
            if (decimal_point_len > 1) {
                /* buffer needs to get smaller */
                size_t rest_len = strlen(buffer + (decimal_point_len - 1));
                memmove(buffer, buffer + (decimal_point_len - 1), rest_len);
                buffer[rest_len] = 0;
            }
        }
    }

            

Reported by FlawFinder.

numpy/distutils/intelccompiler.py
13 issues
Instance of 'IntelCCompiler' has no 'get_version' member
Error

Line: 19 Column: 13

                  def __init__(self, verbose=0, dry_run=0, force=0):
        UnixCCompiler.__init__(self, verbose, dry_run, force)

        v = self.get_version()
        mpopt = 'openmp' if v and v < '15' else 'qopenmp'
        self.cc_exe = ('icc -fPIC -fp-model strict -O3 '
                       '-fomit-frame-pointer -{}').format(mpopt)
        compiler = self.cc_exe


            

Reported by Pylint.

Instance of 'IntelEM64TCCompiler' has no 'get_version' member
Error

Line: 59 Column: 13

                  def __init__(self, verbose=0, dry_run=0, force=0):
        UnixCCompiler.__init__(self, verbose, dry_run, force)

        v = self.get_version()
        mpopt = 'openmp' if v and v < '15' else 'qopenmp'
        self.cc_exe = ('icc -std=c99 -m64 -fPIC -fp-model strict -O3 '
                       '-fomit-frame-pointer -{}').format(mpopt)
        compiler = self.cc_exe


            

Reported by Pylint.

Attribute 'cc' defined outside __init__
Error

Line: 93 Column: 13

              
        def initialize(self, plat_name=None):
            MSVCCompiler.initialize(self, plat_name)
            self.cc = self.find_exe('icl.exe')
            self.lib = self.find_exe('xilib')
            self.linker = self.find_exe('xilink')
            self.compile_options = ['/nologo', '/O3', '/MD', '/W3',
                                    '/Qstd=c99']
            self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3',

            

Reported by Pylint.

Attribute 'lib' defined outside __init__
Error

Line: 94 Column: 13

                      def initialize(self, plat_name=None):
            MSVCCompiler.initialize(self, plat_name)
            self.cc = self.find_exe('icl.exe')
            self.lib = self.find_exe('xilib')
            self.linker = self.find_exe('xilink')
            self.compile_options = ['/nologo', '/O3', '/MD', '/W3',
                                    '/Qstd=c99']
            self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3',
                                          '/Qstd=c99', '/Z7', '/D_DEBUG']

            

Reported by Pylint.

Attribute 'linker' defined outside __init__
Error

Line: 95 Column: 13

                          MSVCCompiler.initialize(self, plat_name)
            self.cc = self.find_exe('icl.exe')
            self.lib = self.find_exe('xilib')
            self.linker = self.find_exe('xilink')
            self.compile_options = ['/nologo', '/O3', '/MD', '/W3',
                                    '/Qstd=c99']
            self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3',
                                          '/Qstd=c99', '/Z7', '/D_DEBUG']


            

Reported by Pylint.

Attribute 'compile_options' defined outside __init__
Error

Line: 96 Column: 13

                          self.cc = self.find_exe('icl.exe')
            self.lib = self.find_exe('xilib')
            self.linker = self.find_exe('xilink')
            self.compile_options = ['/nologo', '/O3', '/MD', '/W3',
                                    '/Qstd=c99']
            self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3',
                                          '/Qstd=c99', '/Z7', '/D_DEBUG']

    class IntelEM64TCCompilerW(IntelCCompilerW):

            

Reported by Pylint.

Attribute 'compile_options_debug' defined outside __init__
Error

Line: 98 Column: 13

                          self.linker = self.find_exe('xilink')
            self.compile_options = ['/nologo', '/O3', '/MD', '/W3',
                                    '/Qstd=c99']
            self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3',
                                          '/Qstd=c99', '/Z7', '/D_DEBUG']

    class IntelEM64TCCompilerW(IntelCCompilerW):
        """
        A modified Intel x86_64 compiler compatible with

            

Reported by Pylint.

__init__ method from base class 'IntelCCompilerW' is not called
Error

Line: 108 Column: 9

                      """
        compiler_type = 'intelemw'

        def __init__(self, verbose=0, dry_run=0, force=0):
            MSVCCompiler.__init__(self, verbose, dry_run, force)
            version_match = simple_version_match(start=r'Intel\(R\).*?64,')
            self.__version = version_match

            

Reported by Pylint.

__init__ method from a non direct base class 'MSVCCompiler' is called
Error

Line: 109 Column: 13

                      compiler_type = 'intelemw'

        def __init__(self, verbose=0, dry_run=0, force=0):
            MSVCCompiler.__init__(self, verbose, dry_run, force)
            version_match = simple_version_match(start=r'Intel\(R\).*?64,')
            self.__version = version_match

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              import platform

from distutils.unixccompiler import UnixCCompiler
from numpy.distutils.exec_command import find_executable
from numpy.distutils.ccompiler import simple_version_match
if platform.system() == 'Windows':
    from numpy.distutils.msvc9compiler import MSVCCompiler



            

Reported by Pylint.

numpy/distutils/fcompiler/compaq.py
13 issues
Method 'wrap_unlinkable_objects' is abstract in class 'FCompiler' but is not overridden
Error

Line: 16 Column: 1

                  # up /bin/df
    compilers.append('CompaqVisualFCompiler')

class CompaqFCompiler(FCompiler):

    compiler_type = 'compaq'
    description = 'Compaq Fortran Compiler'
    version_pattern = r'Compaq Fortran (?P<version>[^\s]*).*'


            

Reported by Pylint.

Method 'runtime_library_dir_option' is abstract in class 'CCompiler' but is not overridden
Error

Line: 16 Column: 1

                  # up /bin/df
    compilers.append('CompaqVisualFCompiler')

class CompaqFCompiler(FCompiler):

    compiler_type = 'compaq'
    description = 'Compaq Fortran Compiler'
    version_pattern = r'Compaq Fortran (?P<version>[^\s]*).*'


            

Reported by Pylint.

Method 'find_library_file' is abstract in class 'CCompiler' but is not overridden
Error

Line: 16 Column: 1

                  # up /bin/df
    compilers.append('CompaqVisualFCompiler')

class CompaqFCompiler(FCompiler):

    compiler_type = 'compaq'
    description = 'Compaq Fortran Compiler'
    version_pattern = r'Compaq Fortran (?P<version>[^\s]*).*'


            

Reported by Pylint.

Method 'find_library_file' is abstract in class 'CCompiler' but is not overridden
Error

Line: 54 Column: 1

                          return ['-shared']
        return ['-shared', '-Wl,-expect_unresolved,*']

class CompaqVisualFCompiler(FCompiler):

    compiler_type = 'compaqv'
    description = 'DIGITAL or Compaq Visual Fortran Compiler'
    version_pattern = (r'(DIGITAL|Compaq) Visual Fortran Optimizing Compiler'
                       r' Version (?P<version>[^\s]*).*')

            

Reported by Pylint.

Method 'runtime_library_dir_option' is abstract in class 'CCompiler' but is not overridden
Error

Line: 54 Column: 1

                          return ['-shared']
        return ['-shared', '-Wl,-expect_unresolved,*']

class CompaqVisualFCompiler(FCompiler):

    compiler_type = 'compaqv'
    description = 'DIGITAL or Compaq Visual Fortran Compiler'
    version_pattern = (r'(DIGITAL|Compaq) Visual Fortran Optimizing Compiler'
                       r' Version (?P<version>[^\s]*).*')

            

Reported by Pylint.

Method 'wrap_unlinkable_objects' is abstract in class 'FCompiler' but is not overridden
Error

Line: 54 Column: 1

                          return ['-shared']
        return ['-shared', '-Wl,-expect_unresolved,*']

class CompaqVisualFCompiler(FCompiler):

    compiler_type = 'compaqv'
    description = 'DIGITAL or Compaq Visual Fortran Compiler'
    version_pattern = (r'(DIGITAL|Compaq) Visual Fortran Optimizing Compiler'
                       r' Version (?P<version>[^\s]*).*')

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              
#http://www.compaq.com/fortran/docs/
import os
import sys

from numpy.distutils.fcompiler import FCompiler
from distutils.errors import DistutilsPlatformError

compilers = ['CompaqFCompiler']

            

Reported by Pylint.

standard import "from distutils.errors import DistutilsPlatformError" should be placed before "from numpy.distutils.fcompiler import FCompiler"
Error

Line: 7 Column: 1

              import sys

from numpy.distutils.fcompiler import FCompiler
from distutils.errors import DistutilsPlatformError

compilers = ['CompaqFCompiler']
if os.name != 'posix' or sys.platform[:6] == 'cygwin' :
    # Otherwise we'd get a false positive on posix systems with
    # case-insensitive filesystems (like darwin), because we'll pick

            

Reported by Pylint.

Missing class docstring
Error

Line: 16 Column: 1

                  # up /bin/df
    compilers.append('CompaqVisualFCompiler')

class CompaqFCompiler(FCompiler):

    compiler_type = 'compaq'
    description = 'Compaq Fortran Compiler'
    version_pattern = r'Compaq Fortran (?P<version>[^\s]*).*'


            

Reported by Pylint.

Missing class docstring
Error

Line: 54 Column: 1

                          return ['-shared']
        return ['-shared', '-Wl,-expect_unresolved,*']

class CompaqVisualFCompiler(FCompiler):

    compiler_type = 'compaqv'
    description = 'DIGITAL or Compaq Visual Fortran Compiler'
    version_pattern = (r'(DIGITAL|Compaq) Visual Fortran Optimizing Compiler'
                       r' Version (?P<version>[^\s]*).*')

            

Reported by Pylint.

numpy/lib/arraypad.py
13 issues
Unused argument 'pad_width'
Error

Line: 521 Column: 28

                  return np.broadcast_to(x, (ndim, 2)).tolist()


def _pad_dispatcher(array, pad_width, mode=None, **kwargs):
    return (array,)


###############################################################################
# Public functions

            

Reported by Pylint.

Unused argument 'mode'
Error

Line: 521 Column: 39

                  return np.broadcast_to(x, (ndim, 2)).tolist()


def _pad_dispatcher(array, pad_width, mode=None, **kwargs):
    return (array,)


###############################################################################
# Public functions

            

Reported by Pylint.

Unused argument 'kwargs'
Error

Line: 521 Column: 1

                  return np.broadcast_to(x, (ndim, 2)).tolist()


def _pad_dispatcher(array, pad_width, mode=None, **kwargs):
    return (array,)


###############################################################################
# Public functions

            

Reported by Pylint.

Argument name "sl" doesn't conform to snake_case naming style
Error

Line: 33 Column: 1

                      arr.round(out=arr)


def _slice_at_axis(sl, axis):
    """
    Construct tuple of slices to slice an array in the given dimension.

    Parameters
    ----------

            

Reported by Pylint.

Variable name "sl" doesn't conform to snake_case naming style
Error

Line: 82 Column: 5

                      The region of interest of the original `array`.
    """
    axis += 1
    sl = (slice(None),) * axis + original_area_slice[axis:]
    return array[sl]


def _pad_simple(array, pad_width, fill_value=None):
    """

            

Reported by Pylint.

Trailing whitespace
Error

Line: 223 Column: 1

                          end_value_pair, edge_pair, width_pair
        )
    )
        
    # Reverse linear space in appropriate dimension
    right_ramp = right_ramp[_slice_at_axis(slice(None, None, -1), axis)]

    return left_ramp, right_ramp


            

Reported by Pylint.

Too many local variables (16/15)
Error

Line: 230 Column: 1

                  return left_ramp, right_ramp


def _get_stats(padded, axis, width_pair, length_pair, stat_func):
    """
    Calculate statistic for the empty-padded array in given dimension.

    Parameters
    ----------

            

Reported by Pylint.

Too many local variables (18/15)
Error

Line: 296 Column: 1

                  return left_stat, right_stat


def _set_reflect_both(padded, axis, width_pair, method, include_edge=False):
    """
    Pad `axis` of `arr` with reflection.

    Parameters
    ----------

            

Reported by Pylint.

Argument name "x" doesn't conform to snake_case naming style
Error

Line: 454 Column: 1

                  return new_left_pad, new_right_pad


def _as_pairs(x, ndim, as_index=False):
    """
    Broadcast `x` to an array with the shape (`ndim`, 2).

    A helper function for `pad` that prepares and validates arguments like
    `pad_width` for iteration in pairs.

            

Reported by Pylint.

Too many statements (62/50)
Error

Line: 530 Column: 1

              

@array_function_dispatch(_pad_dispatcher, module='numpy')
def pad(array, pad_width, mode='constant', **kwargs):
    """
    Pad an array.

    Parameters
    ----------

            

Reported by Pylint.