[Python-projects] pylint E1101 false positive

Sylvain Thénault sylvain.thenault at logilab.fr
Tue Dec 5 09:55:45 CET 2006


On Friday 01 December à 13:50, Daniel Drake wrote:
> Hi,
> 
> 
> import numarray as na
> import numarray.random_array as nar
> im16 = nar.randint(0, 256, 300).astype(na.UInt8)
> 
> 
> 
> The above program causes pylint to complain:
> 
> E1101:  3: Instance of 'int' has no 'astype' member
> 
> 
> This is with numarray-1.5.2. The randint function returns either a
> numarray or an int. In this context it will only return a numarray
> so .astype() is valid.

ticket #3216

-- 
Sylvain Thénault                               LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian:  http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
Python et calcul scientifique:           http://www.logilab.fr/science



More information about the Python-Projects mailing list